using UnityEngine;

namespace Crosstales
{
    // [Assembly-CSharp-firstpass.dll].Crosstales.ExtensionMethods
    public static class ExtensionMethods
    {
        
        #region Crosstales.ExtensionMethods.<>c__DisplayClass6_0
        // [Assembly-CSharp-firstpass.dll].Crosstales.ExtensionMethods.<>c__DisplayClass6_0
        private sealed class __c__DisplayClass6_0
        {
            // Fields
            public string str;
            
            // Methods
            public __c__DisplayClass6_0()
            {
            
            }
            internal bool <CTContainsAny>b__0(string searchTerm)
            {
                if(mem[536886147] == 0)
                {
                    goto label_1;
                }
                
                if(this.str == null)
                {
                        return false;
                }
                
                label_4:
                int val_1 = this.str.IndexOf(value:  searchTerm, comparisonType:  5);
                val_1 = (~val_1) >> 31;
                return false;
                label_1:
                if(this.str != null)
                {
                    goto label_4;
                }
                
                return false;
            }
        
        }
        
        #endregion
        
        
        #region Crosstales.ExtensionMethods.<>c__DisplayClass7_0
        // [Assembly-CSharp-firstpass.dll].Crosstales.ExtensionMethods.<>c__DisplayClass7_0
        private sealed class __c__DisplayClass7_0
        {
            // Fields
            public string str;
            
            // Methods
            public __c__DisplayClass7_0()
            {
            
            }
            internal bool <CTContainsAll>b__0(string searchTerm)
            {
                if(mem[536886147] == 0)
                {
                    goto label_1;
                }
                
                if(this.str == null)
                {
                        return false;
                }
                
                label_4:
                int val_1 = this.str.IndexOf(value:  searchTerm, comparisonType:  5);
                val_1 = (~val_1) >> 31;
                return false;
                label_1:
                if(this.str != null)
                {
                    goto label_4;
                }
                
                return false;
            }
        
        }
        
        #endregion
        
        
        #region Crosstales.ExtensionMethods.<>c__54<T>
        // [Assembly-CSharp-firstpass.dll].Crosstales.ExtensionMethods.<>c__54<T>
        [Serializable]
        private sealed class __c__54_T_
        {
            // Fields
            public static readonly Crosstales.ExtensionMethods.<>c__54<T> __9;
            public static System.Func<T, string> __9__54_0;
            
            // Methods
            private static __c__54_T_()
            {
                var val_1;
                var val_2;
                var val_3;
                val_1 = mem[__RuntimeMethodHiddenParam + 32];
                val_1 = __RuntimeMethodHiddenParam + 32;
                val_2 = mem[__RuntimeMethodHiddenParam + 32 + 306];
                val_2 = __RuntimeMethodHiddenParam + 32 + 306;
                if((val_2 & 1) == 0)
                {
                        val_3 = val_1;
                    val_1 = mem[__RuntimeMethodHiddenParam + 32];
                    val_1 = __RuntimeMethodHiddenParam + 32;
                    val_2 = mem[__RuntimeMethodHiddenParam + 32 + 306];
                    val_2 = __RuntimeMethodHiddenParam + 32 + 306;
                }
                else
                {
                        val_3 = val_1;
                }
                
                if((val_2 & 1) == 0)
                {
                        val_1 = val_1;
                }
                
                mem2[0] = __RuntimeMethodHiddenParam + 32 + 192;
                throw new NullReferenceException();
            }
            public __c__54_T_()
            {
            
            }
            internal string <CTToString>b__54_0(T element)
            {
                if(element == null)
                {
                        return -1610596921;
                }
                
                goto typeof(System.Object).__il2cppRuntimeField_168;
            }
        
        }
        
        #endregion
        
        
        #region Crosstales.ExtensionMethods.<>c__DisplayClass81_0
        // [Assembly-CSharp-firstpass.dll].Crosstales.ExtensionMethods.<>c__DisplayClass81_0
        private sealed class __c__DisplayClass81_0
        {
            // Fields
            public float uiScaleFactor;
            public System.Func<UnityEngine.RectTransform, UnityEngine.Bounds> __9__0;
            
            // Methods
            public __c__DisplayClass81_0()
            {
            
            }
            internal UnityEngine.Bounds <CTGetBounds>b__0(UnityEngine.RectTransform child)
            {
                UnityEngine.Bounds val_0;
                UnityEngine.Vector2 val_1 = child.anchoredPosition;
                UnityEngine.Rect val_2 = child.rect;
                UnityEngine.Rect val_4 = child.rect;
                val_0.m_Center.z = 0f;
                val_0.m_Extents.x = 0f;
                val_0.m_Extents.y = 0f;
                val_0.m_Extents.z = 0f;
                val_0.m_Center.x = 0f;
                val_0.m_Center.y = 0f;
                val_0 = new UnityEngine.Bounds(center:  new UnityEngine.Vector3() {x = V0.16B, y = V1.16B, z = 0f}, size:  new UnityEngine.Vector3() {x = val_2.m_XMin.width * this.uiScaleFactor, y = val_4.m_XMin.height * this.uiScaleFactor, z = this.uiScaleFactor * 0f});
                return val_0;
            }
        
        }
        
        #endregion
        
        
        #region Crosstales.ExtensionMethods.<>c__DisplayClass92_0
        // [Assembly-CSharp-firstpass.dll].Crosstales.ExtensionMethods.<>c__DisplayClass92_0
        private sealed class __c__DisplayClass92_0
        {
            // Fields
            public string name;
            
            // Methods
            public __c__DisplayClass92_0()
            {
            
            }
            internal bool <CTFindAll>b__0(UnityEngine.GameObject child)
            {
                return System.String.op_Equality(a:  child.name, b:  this.name);
            }
        
        }
        
        #endregion
        
        
        #region Crosstales.ExtensionMethods.<>c__DisplayClass93_0<T>
        // [Assembly-CSharp-firstpass.dll].Crosstales.ExtensionMethods.<>c__DisplayClass93_0<T>
        private sealed class __c__DisplayClass93_0_T_
        {
            // Fields
            public string name;
            
            // Methods
            public __c__DisplayClass93_0_T_()
            {
            
            }
            internal bool <CTFindAll>b__0(T child)
            {
                return System.String.op_Equality(a:  child.name, b:  0);
            }
        
        }
        
        #endregion
        
        // Fields
        private static readonly UnityEngine.Vector3 flat;
        
        // Methods
        public static string CTToTitleCase(string str)
        {
            if(str == null)
            {
                    return 0;
            }
            
            return System.Globalization.CultureInfo.CurrentCulture.ToTitleCase(str:  str.ToLower());
        }
        public static string CTReverse(string str)
        {
            if(str == null)
            {
                    return 0;
            }
            
            Unknown val_1 = str.ToCharArray();
            System.Array.Reverse<System.Char>(array:  val_1);
            return 0.CreateString(val:  val_1);
        }
        public static string CTReplace(string str, string oldString, string newString, System.StringComparison comp = 5)
        {
            string val_4 = str;
            if(str == null)
            {
                    return (string)val_4;
            }
            
            if(oldString == null)
            {
                    return (string)val_4;
            }
            
            if(newString == null)
            {
                    return (string)val_4;
            }
            
            do
            {
                int val_1 = val_4.IndexOf(value:  oldString, comparisonType:  comp);
                if((val_1 & 2147483648) != 0)
            {
                    return (string)val_4;
            }
            
                string val_3 = val_4.Remove(startIndex:  val_1, count:  oldString._stringLength).Insert(startIndex:  val_1, value:  newString);
                val_4 = val_3;
            }
            while(val_3 != null);
            
            throw new NullReferenceException();
        }
        public static bool CTEquals(string str, string toCheck, System.StringComparison comp = 5)
        {
            if(str == null)
            {
                    return (bool)str;
            }
            
            return str.Equals(value:  toCheck, comparisonType:  comp);
        }
        public static bool CTContains(string str, string toCheck, System.StringComparison comp = 5)
        {
            if(str == null)
            {
                    return (bool)val_1;
            }
            
            int val_1 = str.IndexOf(value:  toCheck, comparisonType:  comp);
            val_1 = (~val_1) >> 31;
            return (bool)val_1;
        }
        public static bool CTContainsAny(string str, string searchTerms, char splitChar = '\x20')
        {
            object val_1 = 536898637;
            val_1 = new System.Object();
            mem[536898653] = str;
            if(mem[536898653] == 0)
            {
                    return false;
            }
            
            if((System.String.IsNullOrEmpty(value:  searchTerms)) != false)
            {
                    return false;
            }
            
            if(mem[536881037] != 0)
            {
                    mem[536881045] = splitChar;
                System.Func<System.Object, System.Boolean> val_4 = 536903187;
                val_4 = new System.Func<System.Object, System.Boolean>(object:  val_1, method:  1610682821);
                return System.Linq.Enumerable.Any<System.Object>(source:  searchTerms.Split(separator:  536881013, options:  1), predicate:  val_4);
            }
        
        }
        public static bool CTContainsAll(string str, string searchTerms, char splitChar = '\x20')
        {
            object val_1 = 536898639;
            val_1 = new System.Object();
            mem[536898655] = str;
            if(mem[536898655] == 0)
            {
                    return false;
            }
            
            if((System.String.IsNullOrEmpty(value:  searchTerms)) != false)
            {
                    return false;
            }
            
            if(mem[536881037] != 0)
            {
                    mem[536881045] = splitChar;
                System.Func<System.Object, System.Boolean> val_4 = 536903187;
                val_4 = new System.Func<System.Object, System.Boolean>(object:  val_1, method:  1610682825);
                return System.Linq.Enumerable.All<System.Object>(source:  searchTerms.Split(separator:  536881013, options:  1), predicate:  val_4);
            }
        
        }
        public static string CTRemoveNewLines(string str, string replacement = "#nl#", string newLine)
        {
            string val_3;
            if(str == null)
            {
                    return (string)str;
            }
            
            val_3 = newLine;
            if((System.String.IsNullOrEmpty(value:  newLine)) == false)
            {
                    return str.Replace(oldValue:  val_3 = System.Environment.NewLine, newValue:  replacement);
            }
            
            return str.Replace(oldValue:  val_3, newValue:  replacement);
        }
        public static string CTAddNewLines(string str, string replacement = "#nl#", string newLine)
        {
            string val_3 = newLine;
            if(str == null)
            {
                    return 0;
            }
            
            if((System.String.IsNullOrEmpty(value:  val_3 = newLine)) != false)
            {
                    val_3 = System.Environment.NewLine;
            }
            
            if(mem[536886147] != 0)
            {
                    return Crosstales.ExtensionMethods.CTReplace(str:  str, oldString:  replacement, newString:  val_3, comp:  5);
            }
            
            return Crosstales.ExtensionMethods.CTReplace(str:  str, oldString:  replacement, newString:  val_3, comp:  5);
        }
        public static bool CTisNumeric(string str)
        {
            if(str == null)
            {
                    return (bool)System.Double.TryParse(s:  str, result:  null);
            }
            
            return (bool)System.Double.TryParse(s:  str, result:  null);
        }
        public static bool CTisInteger(string str)
        {
            string val_5;
            if(str != null)
            {
                    if((str.Contains(value:  -1610611497)) == false)
            {
                goto label_2;
            }
            
            }
            
            val_5 = 0;
            return (bool)System.Int64.TryParse(s:  val_5 = str, result:  1152921504930418008);
            label_2:
            return (bool)System.Int64.TryParse(s:  val_5, result:  1152921504930418008);
        }
        public static bool CTisEmail(string str)
        {
            var val_1;
            if(str == null)
            {
                    return false;
            }
            
            val_1 = 536882899;
            if(mem[536883123] != 0)
            {
                    return mem[536883083] + 8.IsMatch(input:  str);
            }
            
            val_1 = 536882899;
            return mem[536883083] + 8.IsMatch(input:  str);
        }
        public static bool CTisWebsite(string str)
        {
            var val_1;
            if(str == null)
            {
                    return false;
            }
            
            val_1 = 536882899;
            if(mem[536883123] != 0)
            {
                    return mem[536883083] + 24.IsMatch(input:  str);
            }
            
            val_1 = 536882899;
            return mem[536883083] + 24.IsMatch(input:  str);
        }
        public static bool CTisCreditcard(string str)
        {
            var val_1;
            if(str == null)
            {
                    return false;
            }
            
            val_1 = 536882899;
            if(mem[536883123] != 0)
            {
                    return mem[536883083] + 16.IsMatch(input:  str);
            }
            
            val_1 = 536882899;
            return mem[536883083] + 16.IsMatch(input:  str);
        }
        public static bool CTisIPv4(string str)
        {
            var val_1;
            if(str == null)
            {
                    return false;
            }
            
            val_1 = 536882899;
            if(mem[536883123] != 0)
            {
                    return mem[536883083] + 32.IsMatch(input:  str);
            }
            
            val_1 = 536882899;
            return mem[536883083] + 32.IsMatch(input:  str);
        }
        public static bool CTisAlphanumeric(string str)
        {
            var val_1;
            if(str == null)
            {
                    return false;
            }
            
            val_1 = 536882899;
            if(mem[536883123] != 0)
            {
                    return mem[536883083] + 48.IsMatch(input:  str);
            }
            
            val_1 = 536882899;
            return mem[536883083] + 48.IsMatch(input:  str);
        }
        public static bool CThasLineEndings(string str)
        {
            var val_1;
            if(str == null)
            {
                    return false;
            }
            
            val_1 = 536882899;
            if(mem[536883123] != 0)
            {
                    return mem[536883083].IsMatch(input:  str);
            }
            
            val_1 = 536882899;
            return mem[536883083].IsMatch(input:  str);
        }
        public static bool CThasInvalidChars(string str)
        {
            var val_1;
            if(str == null)
            {
                    return false;
            }
            
            val_1 = 536882899;
            if(mem[536883123] != 0)
            {
                    return mem[536883083] + 40.IsMatch(input:  str);
            }
            
            val_1 = 536882899;
            return mem[536883083] + 40.IsMatch(input:  str);
        }
        public static bool CTStartsWith(string str, string toCheck, System.StringComparison comp = 5)
        {
            if(str == null)
            {
                    return true;
            }
            
            if((System.String.IsNullOrEmpty(value:  toCheck)) == false)
            {
                    return str.StartsWith(value:  toCheck, comparisonType:  comp);
            }
            
            return true;
        }
        public static bool CTEndsWith(string str, string toCheck, System.StringComparison comp = 5)
        {
            if(str == null)
            {
                    return true;
            }
            
            if((System.String.IsNullOrEmpty(value:  toCheck)) == false)
            {
                    return str.EndsWith(value:  toCheck, comparisonType:  comp);
            }
            
            return true;
        }
        public static int CTLastIndexOf(string str, string toCheck, System.StringComparison comp = 5)
        {
            if(str != null)
            {
                    if((System.String.IsNullOrEmpty(value:  toCheck)) == false)
            {
                    return str.LastIndexOf(value:  toCheck, comparisonType:  comp);
            }
            
                return 0;
            }
            
            27342272 = new System.ArgumentNullException(paramName:  27545296);
            throw 27342272;
        }
        public static int CTIndexOf(string str, string toCheck, System.StringComparison comp = 5)
        {
            if(str != null)
            {
                    if((System.String.IsNullOrEmpty(value:  toCheck)) == false)
            {
                    return str.IndexOf(value:  toCheck, comparisonType:  comp);
            }
            
                return 0;
            }
            
            27342272 = new System.ArgumentNullException(paramName:  27545296);
            throw 27342272;
        }
        public static int CTIndexOf(string str, string toCheck, int startIndex, System.StringComparison comp = 5)
        {
            if(str != null)
            {
                    if((System.String.IsNullOrEmpty(value:  toCheck)) == false)
            {
                    return str.IndexOf(value:  toCheck, startIndex:  startIndex, comparisonType:  comp);
            }
            
                return 0;
            }
            
            27342272 = new System.ArgumentNullException(paramName:  27545296);
            throw 27342272;
        }
        public static string CTToBase64(string str, System.Text.Encoding encoding)
        {
            if(str == null)
            {
                    return 0;
            }
            
            if(mem[536886147] != 0)
            {
                    return Crosstales.ExtensionMethods.CTToBase64(data:  (encoding == 0) ? System.Text.Encoding.UTF8 : encoding);
            }
            
            return Crosstales.ExtensionMethods.CTToBase64(data:  (encoding == 0) ? System.Text.Encoding.UTF8 : encoding);
        }
        public static string CTFromBase64(string str, System.Text.Encoding encoding)
        {
            System.Text.Encoding val_8 = encoding;
            if(str == null)
            {
                    return 0;
            }
            
            var val_2 = (val_8 == 0) ? System.Text.Encoding.UTF8 : (val_8);
            Unknown val_3 = Crosstales.ExtensionMethods.CTFromBase64ToByteArray(str:  str);
            val_8 = ???;
            goto val_8 == null ? val_1 : encoding + 856;
        }
        public static byte[] CTFromBase64ToByteArray(string str)
        {
            if(str == null)
            {
                    return 0;
            }
            
            if(mem[536884577] != 0)
            {
                    return System.Convert.FromBase64String(s:  str);
            }
            
            return System.Convert.FromBase64String(s:  str);
        }
        public static string CTToHex(string str, bool addPrefix = False)
        {
            var val_6;
            string val_7;
            var val_8;
            val_6 = str;
            if(val_6 != null)
            {
                    System.Text.StringBuilder val_1 = 536893081;
                val_1 = new System.Text.StringBuilder();
                if(addPrefix != false)
            {
                    System.Text.StringBuilder val_2 = val_1.Append(value:  -1610611345);
            }
            
                val_7 = val_6;
                System.Globalization.CodePageDataItem val_6 = val_3.dataItem;
                val_6 = System.Text.Encoding.Unicode;
                if(val_6 >= 1)
            {
                    var val_7 = 0;
                val_6 = val_6 & 4294967295;
                do
            {
                if(val_7 >= val_6)
            {
                    throw new NullReferenceException();
            }
            
                val_7 = val_3.m_deserializedFromEverett + 0.ToString(format:  -1610601303);
                System.Text.StringBuilder val_5 = val_1.Append(value:  val_7);
                val_7 = val_7 + 1;
            }
            while(val_7 < (val_3.dataItem << ));
            
            }
            
                val_8 = val_1;
                return (string)val_8;
            }
            
            val_8 = 0;
            return (string)val_8;
        }
        public static string CTHexToString(string hexString)
        {
            var val_18;
            var val_19;
            if(hexString == null)
            {
                    return 0;
            }
            
            val_19 = hexString;
            if((hexString.StartsWith(value:  -1610611345)) != false)
            {
                    string val_2 = hexString.Substring(startIndex:  2);
            }
            
            if((hexString._stringLength & 1) == 0)
            {
                    var val_4 = ((val_2._stringLength < 0) ? (val_2._stringLength + 1) : val_2._stringLength) >> 1;
                if(mem[536880989] >= 1)
            {
                    var val_19 = 0;
                var val_18 = 0;
                do
            {
                if(val_18 >= mem[536880989])
            {
                    throw new NullReferenceException();
            }
            
                mem[536880997] = System.Convert.ToByte(value:  hexString.Substring(startIndex:  0, length:  2), fromBase:  16);
                val_18 = val_18 + 1;
                val_19 = val_19 + 2;
            }
            while(val_18 < (mem[536880989] << ));
            
            }
            
                System.Text.Encoding val_7 = System.Text.Encoding.Unicode;
                val_18 = ???;
            }
            else
            {
                    27346808 = new System.FormatException(message:  27515192 + hexString);
                throw 27346808;
            }
        
        }
        public static UnityEngine.Color32 CTHexToColor32(string hexString)
        {
            System.ArgumentNullException val_21;
            var val_23;
            val_21 = hexString;
            if(val_21 != null)
            {
                    if((val_21.StartsWith(value:  -1610611345)) != false)
            {
                    val_21 = val_21.Substring(startIndex:  2);
            }
            
                if((val_21.StartsWith(value:  -1610612299)) != false)
            {
                    val_21 = val_21.Substring(startIndex:  1);
            }
            
                if(val_4._stringLength != 6)
            {
                    if(val_4._stringLength != 8)
            {
                goto label_7;
            }
            
            }
            
                if(val_4._stringLength == 8)
            {
                    val_23 = ((System.Convert.ToByte(value:  val_21.Substring(startIndex:  6, length:  2), fromBase:  16)) & 255) << 24;
            }
            else
            {
                    val_23 = 4278190080;
            }
            
                byte val_14 = (System.Convert.ToByte(value:  val_21.Substring(startIndex:  2, length:  2), fromBase:  16)) & 255;
                byte val_16 = (System.Convert.ToByte(value:  val_21.Substring(startIndex:  4, length:  2), fromBase:  16)) & 255;
                return new UnityEngine.Color32() {r = ((System.Convert.ToByte(value:  val_21.Substring(startIndex:  0, length:  2), fromBase:  16)) & 255) | 4278190080, g = ((System.Convert.ToByte(value:  val_21.Substring(startIndex:  0, length:  2), fromBase:  16)) & 255) | 4278190080, b = ((System.Convert.ToByte(value:  val_21.Substring(startIndex:  0, length:  2), fromBase:  16)) & 255) | 4278190080, a = ((System.Convert.ToByte(value:  val_21.Substring(startIndex:  0, length:  2), fromBase:  16)) & 255) | 4278190080};
            }
            
            val_21 = 27342272;
            val_21 = new System.ArgumentNullException(paramName:  27535992);
            throw val_21;
            label_7:
            27346808 = new System.FormatException(message:  27515184 + val_21);
            throw 27346808;
        }
        public static UnityEngine.Color CTHexToColor(string hexString)
        {
            UnityEngine.Color32 val_1 = Crosstales.ExtensionMethods.CTHexToColor32(hexString:  hexString);
            float val_3 = (float)val_1.r & 255;
            float val_6 = 255f;
            float val_4 = (float)(uint)(val_1.r >> 8) & 255;
            float val_5 = (float)(uint)(val_1.r >> 16) & 255;
            val_3 = val_3 / val_6;
            val_4 = val_4 / val_6;
            val_5 = val_5 / val_6;
            val_6 = ((float)(ulong)(val_1.r >> 24) & 255) / val_6;
            return new UnityEngine.Color() {r = val_3, g = val_4, b = val_5, a = val_6};
        }
        public static byte[] CTToByteArray(string str, System.Text.Encoding encoding)
        {
            if(str == null)
            {
                    return (Unknown)(encoding == 0) ? System.Text.Encoding.UTF8 : encoding;
            }
            
            goto encoding == null ? val_1 : encoding + 584;
        }
        public static string CTClearTags(string str)
        {
            var val_2;
            if(str == null)
            {
                    return 0;
            }
            
            val_2 = 536882899;
            if(mem[536883123] != 0)
            {
                    return mem[536883083] + 64.Replace(input:  str, replacement:  mem[536893213]).Trim();
            }
            
            val_2 = 536882899;
            return mem[536883083] + 64.Replace(input:  str, replacement:  mem[536893213]).Trim();
        }
        public static string CTClearSpaces(string str)
        {
            var val_2;
            if(str == null)
            {
                    return 0;
            }
            
            val_2 = 536882899;
            if(mem[536883123] != 0)
            {
                    return mem[536883083] + 56.Replace(input:  str, replacement:  -1610612557).Trim();
            }
            
            val_2 = 536882899;
            return mem[536883083] + 56.Replace(input:  str, replacement:  -1610612557).Trim();
        }
        public static string CTClearLineEndings(string str)
        {
            var val_2;
            if(str == null)
            {
                    return 0;
            }
            
            val_2 = 536882899;
            if(mem[536883123] != 0)
            {
                    return mem[536883083].Replace(input:  str, replacement:  mem[536893213]).Trim();
            }
            
            val_2 = 536882899;
            return mem[536883083].Replace(input:  str, replacement:  mem[536893213]).Trim();
        }
        public static void CTShuffle<T>(T[] array, int seed = 0)
        {
            if((array == null) || (array.Length == 0))
            {
                goto label_2;
            }
            
            System.Random val_1 = 536891173;
            if(seed != 0)
            {
                    val_1 = new System.Random(Seed:  seed);
            }
            else
            {
                    val_1 = new System.Random();
            }
            
            Unknown val_8 = array.Length;
            if(val_8 < 2)
            {
                    return;
            }
            
            var val_2 = (long)val_8 + 1;
            label_10:
            Unknown val_6 = array.Length;
            if(val_1 >= val_6)
            {
                goto label_9;
            }
            
            val_6 = val_6 & 4294967295;
            if((val_2 - 2) >= val_6)
            {
                goto label_9;
            }
            
            var val_7 = array[val_8][24];
            mem2[0] = array[val_1];
            if(val_1 >= array.Length)
            {
                goto label_9;
            }
            
            mem2[0] = null;
            val_2 = val_2 - 1;
            val_8 = val_8 - 1;
            array[val_8][24] = array[val_8][24] - 8;
            if(val_2 > 2)
            {
                goto label_10;
            }
            
            return;
            label_9:
            label_2:
            27342272 = new System.ArgumentNullException(paramName:  27528296);
            throw 27342272;
        }
        public static string CTDump<T>(T[] array, string prefix = "", string postfix = "", bool appendNewLine = True, string delimiter = "; ")
        {
            var val_18;
            var val_19;
            string val_20;
            string val_21;
            string val_22;
            val_19 = appendNewLine;
            val_20 = prefix;
            if(array == null)
            {
                    return 0;
            }
            
            val_21 = 0;
            536893081 = new System.Text.StringBuilder();
            Unknown val_18 = array.Length;
            if(val_18 >= 1)
            {
                    var val_19 = 0;
                val_18 = val_18 & 4294967295;
                do
            {
                if(val_19 >= val_18)
            {
                    throw new NullReferenceException();
            }
            
                if(val_1.Length >= 1)
            {
                    val_22 = delimiter;
                if(val_19 != false)
            {
                    val_22 = System.Environment.NewLine;
            }
            
                System.Text.StringBuilder val_4 = val_1.Append(value:  val_22);
            }
            
                System.Text.StringBuilder val_5 = val_1.Append(value:  val_20);
                System.Text.StringBuilder val_6 = val_1.Append(value:  1152921504979278320);
                val_21 = postfix;
                System.Text.StringBuilder val_7 = val_1.Append(value:  val_21);
                val_19 = val_19 + 1;
            }
            while(val_19 < (array.Length << ));
            
            }
            
            val_19 = ???;
            val_20 = ???;
            val_18 = ???;
            goto mem[536893081] + 360;
        }
        public static string CTDump(UnityEngine.Quaternion[] array)
        {
            var val_22;
            var val_23;
            if(array == null)
            {
                    return 0;
            }
            
            val_23 = 0;
            536893081 = new System.Text.StringBuilder();
            Unknown val_22 = array.Length;
            if(val_22 >= 1)
            {
                    var val_23 = 0;
                val_22 = val_22 & 4294967295;
                do
            {
                if(val_23 >= val_22)
            {
                    throw new NullReferenceException();
            }
            
                if(val_1.Length >= 1)
            {
                    System.Text.StringBuilder val_4 = val_1.Append(value:  System.Environment.NewLine);
            }
            
                System.Text.StringBuilder val_5 = val_1.Append(value:  1.445254E-25f);
                System.Text.StringBuilder val_6 = val_1.Append(value:  -1610611733);
                System.Text.StringBuilder val_7 = val_1.Append(value:  1.445254E-25f);
                System.Text.StringBuilder val_8 = val_1.Append(value:  -1610611733);
                System.Text.StringBuilder val_9 = val_1.Append(value:  1.445254E-25f);
                System.Text.StringBuilder val_10 = val_1.Append(value:  -1610611733);
                val_23 = 0;
                System.Text.StringBuilder val_11 = val_1.Append(value:  1.445254E-25f);
                val_23 = val_23 + 1;
            }
            while(val_23 < (array.Length << ));
            
            }
            
            val_22 = ???;
            goto mem[536893081] + 360;
        }
        public static string CTDump(UnityEngine.Vector2[] array)
        {
            var val_16;
            var val_17;
            if(array == null)
            {
                    return 0;
            }
            
            val_17 = 0;
            536893081 = new System.Text.StringBuilder();
            Unknown val_16 = array.Length;
            if(val_16 >= 1)
            {
                    var val_17 = 0;
                val_16 = val_16 & 4294967295;
                do
            {
                if(val_17 >= val_16)
            {
                    throw new NullReferenceException();
            }
            
                if(val_1.Length >= 1)
            {
                    System.Text.StringBuilder val_4 = val_1.Append(value:  System.Environment.NewLine);
            }
            
                System.Text.StringBuilder val_5 = val_1.Append(value:  1.775558E-26f);
                System.Text.StringBuilder val_6 = val_1.Append(value:  -1610611733);
                val_17 = 0;
                System.Text.StringBuilder val_7 = val_1.Append(value:  1.775558E-26f);
                val_17 = val_17 + 1;
            }
            while(val_17 < (array.Length << ));
            
            }
            
            val_16 = ???;
            goto mem[536893081] + 360;
        }
        public static string CTDump(UnityEngine.Vector3[] array)
        {
            var val_19;
            var val_20;
            if(array == null)
            {
                    return 0;
            }
            
            val_20 = 0;
            536893081 = new System.Text.StringBuilder();
            Unknown val_19 = array.Length;
            if(val_19 >= 1)
            {
                    var val_20 = 0;
                val_19 = val_19 & 4294967295;
                do
            {
                if(val_20 >= val_19)
            {
                    throw new NullReferenceException();
            }
            
                if(val_1.Length >= 1)
            {
                    System.Text.StringBuilder val_4 = val_1.Append(value:  System.Environment.NewLine);
            }
            
                System.Text.StringBuilder val_5 = val_1.Append(value:  4.141032E-26f);
                System.Text.StringBuilder val_6 = val_1.Append(value:  -1610611733);
                System.Text.StringBuilder val_7 = val_1.Append(value:  4.141032E-26f);
                System.Text.StringBuilder val_8 = val_1.Append(value:  -1610611733);
                val_20 = 0;
                System.Text.StringBuilder val_9 = val_1.Append(value:  4.141032E-26f);
                val_20 = val_20 + 1;
            }
            while(val_20 < (array.Length << ));
            
            }
            
            val_19 = ???;
            goto mem[536893081] + 360;
        }
        public static string CTDump(UnityEngine.Vector4[] array)
        {
            var val_22;
            var val_23;
            if(array == null)
            {
                    return 0;
            }
            
            val_23 = 0;
            536893081 = new System.Text.StringBuilder();
            Unknown val_22 = array.Length;
            if(val_22 >= 1)
            {
                    var val_23 = 0;
                val_22 = val_22 & 4294967295;
                do
            {
                if(val_23 >= val_22)
            {
                    throw new NullReferenceException();
            }
            
                if(val_1.Length >= 1)
            {
                    System.Text.StringBuilder val_4 = val_1.Append(value:  System.Environment.NewLine);
            }
            
                System.Text.StringBuilder val_5 = val_1.Append(value:  4.893911E-26f);
                System.Text.StringBuilder val_6 = val_1.Append(value:  -1610611733);
                System.Text.StringBuilder val_7 = val_1.Append(value:  4.893911E-26f);
                System.Text.StringBuilder val_8 = val_1.Append(value:  -1610611733);
                System.Text.StringBuilder val_9 = val_1.Append(value:  4.893911E-26f);
                System.Text.StringBuilder val_10 = val_1.Append(value:  -1610611733);
                val_23 = 0;
                System.Text.StringBuilder val_11 = val_1.Append(value:  4.893911E-26f);
                val_23 = val_23 + 1;
            }
            while(val_23 < (array.Length << ));
            
            }
            
            val_22 = ???;
            goto mem[536893081] + 360;
        }
        public static string[] CTToStringArray<T>(T[] array)
        {
            Unknown val_2;
            if(array == null)
            {
                goto label_1;
            }
            
            Unknown val_2 = array.Length;
            if(val_2 < 1)
            {
                    return 536881467;
            }
            
            var val_3 = 0;
            val_2 = val_2 & 4294967295;
            label_9:
            if(val_3 >= val_2)
            {
                    throw new ArrayTypeMismatchException();
            }
            
            if(null == null)
            {
                goto label_4;
            }
            
            val_2 = 1152921504979290608;
            label_11:
            if(val_3 >= mem[536881491])
            {
                    throw new ArrayTypeMismatchException();
            }
            
            mem[536881499] = val_2;
            val_3 = val_3 + 1;
            if(val_3 < (array.Length << ))
            {
                goto label_9;
            }
            
            return 536881467;
            label_4:
            val_2 = -1610596921;
            if(536881467 != 0)
            {
                goto label_11;
            }
            
            throw new NullReferenceException();
            label_1:
            27342272 = new System.ArgumentNullException(paramName:  27528296);
            throw 27342272;
        }
        public static float[] CTToFloatArray(byte[] array, int count = 0)
        {
            int val_4 = count;
            if(array != null)
            {
                    if(val_4 <= 0)
            {
                    val_4 = array.Length;
            }
            
                var val_2 = ((val_4 < 0) ? (val_4 + 1) : (val_4)) >> 1;
                if(val_4 < 1)
            {
                    return 536881441;
            }
            
                var val_10 = 0;
                do
            {
                if(0 >= array.Length)
            {
                    throw new NullReferenceException();
            }
            
                var val_3 = 0 + 1;
                if(val_3 >= array.Length)
            {
                    throw new NullReferenceException();
            }
            
                byte val_8 = array[val_3];
                if(val_10 >= mem[536881465])
            {
                    throw new NullReferenceException();
            }
            
                float val_9 = 3.051758E-05f;
                var val_5 = 536881441 + 0;
                val_9 = ((float)(int)array[0] & 65535) * val_9;
                val_10 = val_10 + 1;
                mem2[0] = val_9;
            }
            while((val_3 + 1) < val_4);
            
                return 536881441;
            }
            
            27342272 = new System.ArgumentNullException(paramName:  27528296);
            throw 27342272;
        }
        public static byte[] CTToByteArray(float[] array, int count = 0)
        {
            int val_7 = count;
            if(array != null)
            {
                    if(val_7 <= 0)
            {
                    val_7 = array.Length;
            }
            
                Unknown val_1 = val_7 << 1;
                if(val_7 < 1)
            {
                    return 536880965;
            }
            
                var val_8 = 0;
                var val_7 = 0;
                do
            {
                if(val_8 >= array.Length)
            {
                    throw new NullReferenceException();
            }
            
                float val_2 = null * 32767f;
                var val_3 = (val_2 == Infinityf) ? 0 : ((int)val_2);
                if(val_7 >= mem[536880989])
            {
                    throw new NullReferenceException();
            }
            
                var val_4 = 536880965 + (val_7 << );
                mem2[0] = val_3;
                val_7 = val_7 + 1;
                if(val_7 >= mem[536880989])
            {
                    throw new NullReferenceException();
            }
            
                val_8 = val_8 + 1;
                val_3 = val_3 >> 8;
                var val_5 = 536880965 + (val_7 << );
                val_7 = val_7 + 1;
                mem2[0] = val_3;
            }
            while(val_7 != val_8);
            
                return 536880965;
            }
            
            27342272 = new System.ArgumentNullException(paramName:  27528296);
            throw 27342272;
        }
        public static UnityEngine.Texture2D CTToTexture(byte[] data)
        {
            if(data != null)
            {
                    UnityEngine.Texture2D val_1 = 536894117;
                val_1 = new UnityEngine.Texture2D(width:  1, height:  1);
                bool val_2 = UnityEngine.ImageConversion.LoadImage(tex:  val_1, data:  data);
                return val_1;
            }
            
            27342272 = new System.ArgumentNullException(paramName:  27531864);
            throw 27342272;
        }
        public static UnityEngine.Sprite CTToSprite(byte[] data)
        {
            if(data != null)
            {
                    UnityEngine.Texture2D val_1 = Crosstales.ExtensionMethods.CTToTexture(data:  data);
                UnityEngine.Rect val_4 = new UnityEngine.Rect(x:  0f, y:  0f, width:  (float)val_1.width, height:  (float)val_1.height);
                int val_5 = val_1.width;
                int val_6 = val_1.height;
                var val_7 = (val_5 < 0) ? (val_5 + 1) : (val_5);
                val_7 = val_7 >> 1;
                var val_9 = ((val_6 < 0) ? (val_6 + 1) : (val_6)) >> 1;
                return (UnityEngine.Sprite)UnityEngine.Sprite.Create(texture:  val_1, rect:  new UnityEngine.Rect() {m_XMin = val_4.m_XMin, m_YMin = val_4.m_YMin, m_Width = val_4.m_Width, m_Height = val_4.m_Height}, pivot:  new UnityEngine.Vector2());
            }
            
            27342272 = new System.ArgumentNullException(paramName:  27531864);
            throw 27342272;
        }
        public static string CTToString(byte[] data, System.Text.Encoding encoding)
        {
            if(data == null)
            {
                    return (string)System.Text.Encoding.UTF8;
            }
            
            if(encoding == null)
            {
                
            }
        
        }
        public static string CTToBase64(byte[] data)
        {
            if(data == null)
            {
                    return 0;
            }
            
            if(mem[536884577] != 0)
            {
                    return System.Convert.ToBase64String(inArray:  data);
            }
            
            return System.Convert.ToBase64String(inArray:  data);
        }
        public static void CTShuffle<T>(System.Collections.Generic.IList<T> list, int seed = 0)
        {
            int val_9;
            var val_10;
            var val_11;
            var val_12;
            var val_13;
            var val_14;
            var val_15;
            var val_16;
            var val_17;
            var val_18;
            var val_19;
            var val_20;
            var val_21;
            var val_22;
            val_9 = seed;
            if(list != null)
            {
                    System.Random val_1 = 536891173;
                if(val_9 != 0)
            {
                    val_10 = 0;
                val_1 = new System.Random(Seed:  val_9);
            }
            else
            {
                    val_1 = new System.Random();
            }
            
                val_11 = mem[__RuntimeMethodHiddenParam + 56];
                val_11 = __RuntimeMethodHiddenParam + 56;
                if(((__RuntimeMethodHiddenParam + 56 + 306) & 1) == 0)
            {
                    val_11 = val_11;
            }
            
                val_12 = list;
                val_10 = 0;
                if(list < 2)
            {
                    return;
            }
            
                do
            {
                val_13 = mem[mem[536891173] + 424 + 8];
                val_13 = mem[536891173] + 424 + 8;
                val_14 = mem[__RuntimeMethodHiddenParam + 56 + 16];
                val_14 = __RuntimeMethodHiddenParam + 56 + 16;
                if(((__RuntimeMethodHiddenParam + 56 + 16 + 306) & 1) == 0)
            {
                    val_14 = val_14;
            }
            
                val_15 = list;
                val_13 = 0;
                val_16 = mem[__RuntimeMethodHiddenParam + 56 + 16 + 8];
                val_16 = __RuntimeMethodHiddenParam + 56 + 16 + 8;
                val_17 = mem[__RuntimeMethodHiddenParam + 56 + 16];
                val_17 = __RuntimeMethodHiddenParam + 56 + 16;
                if(((__RuntimeMethodHiddenParam + 56 + 16 + 306) & 1) == 0)
            {
                    val_17 = val_17;
            }
            
                val_18 = list;
                val_16 = 0;
                val_19 = mem[__RuntimeMethodHiddenParam + 56 + 16];
                val_19 = __RuntimeMethodHiddenParam + 56 + 16;
                if(((__RuntimeMethodHiddenParam + 56 + 16 + 306) & 1) == 0)
            {
                    val_19 = val_19;
            }
            
                val_20 = list;
                val_21 = mem[__RuntimeMethodHiddenParam + 56 + 16];
                val_21 = __RuntimeMethodHiddenParam + 56 + 16;
                if(((__RuntimeMethodHiddenParam + 56 + 16 + 306) & 1) == 0)
            {
                    val_21 = val_21;
            }
            
                val_22 = list;
                val_9 = list - 1;
            }
            while(list > 2);
            
                return;
            }
            
            27342272 = new System.ArgumentNullException(paramName:  27539456);
            throw 27342272;
        }
        public static string CTDump<T>(System.Collections.Generic.IList<T> list, string prefix = "", string postfix = "", bool appendNewLine = True, string delimiter = "; ")
        {
            var val_13;
            object val_14;
            var val_15;
            var val_16;
            var val_17;
            var val_18;
            var val_20;
            var val_21;
            string val_22;
            var val_23;
            var val_25;
            var val_26;
            val_13 = __RuntimeMethodHiddenParam;
            val_14 = list;
            if(val_14 == null)
            {
                    return 0;
            }
            
            System.Text.StringBuilder val_1 = 536893081;
            if(val_1 == 0)
            {
                    throw new NullReferenceException();
            }
            
            val_1 = new System.Text.StringBuilder();
            val_15 = mem[__RuntimeMethodHiddenParam + 56];
            val_15 = __RuntimeMethodHiddenParam + 56;
            if(((__RuntimeMethodHiddenParam + 56 + 306) & 1) == 0)
            {
                    val_15 = val_15;
            }
            
            val_16 = val_14;
            val_17 = 27348040;
            val_14 = val_14;
            label_21:
            val_18 = val_14;
            if((val_14 & 1) == 0)
            {
                goto label_13;
            }
            
            val_20 = mem[__RuntimeMethodHiddenParam + 56 + 16];
            val_20 = __RuntimeMethodHiddenParam + 56 + 16;
            if(((__RuntimeMethodHiddenParam + 56 + 16 + 306) & 1) == 0)
            {
                    val_20 = val_20;
            }
            
            val_21 = val_14;
            if(val_1.Length >= 1)
            {
                    val_22 = delimiter;
                if(appendNewLine != false)
            {
                    val_22 = System.Environment.NewLine;
            }
            
                System.Text.StringBuilder val_7 = val_1.Append(value:  val_22);
            }
            
            System.Text.StringBuilder val_8 = val_1.Append(value:  prefix);
            System.Text.StringBuilder val_9 = val_1.Append(value:  val_14);
            System.Text.StringBuilder val_10 = val_1.Append(value:  postfix);
            goto label_21;
            label_13:
            val_13 = 0;
            label_37:
            if(val_14 != null)
            {
                    val_23 = val_14;
            }
            
            if(val_13 != 0)
            {
                goto label_35;
            }
            
            val_13 = ???;
            val_14 = ???;
            val_25 = mem[mem[536893081] + 360 + 8];
            val_25 = mem[536893081] + 360 + 8;
            val_17 = ???;
            goto mem[536893081] + 360;
            label_35:
            if(val_25 != 1)
            {
                goto label_36;
            }
            
            goto label_37;
            label_36:
            if(val_14 == 0)
            {
                goto label_45;
            }
            
            label_44:
            var val_14 = val_14;
            var val_13 = val_14 + 298;
            if(val_13 == 0)
            {
                goto label_39;
            }
            
            var val_12 = val_14 + 176;
            val_12 = val_12 + 8;
            label_41:
            if(((val_14 + 176 + 8) + -8) == val_17)
            {
                goto label_40;
            }
            
            val_13 = val_13 - 1;
            val_12 = val_12 + 16;
            if(((val_14 + 176 + 8) + -8) != val_17)
            {
                goto label_41;
            }
            
            label_39:
            val_26 = val_14;
            goto label_42;
            label_40:
            val_14 = val_14 + (((val_14 + 176 + 8)) << 4);
            val_26 = val_14 + 312;
            label_42:
            label_45:
            if(val_14 != 0)
            {
                goto label_44;
            }
            
            goto label_45;
        }
        public static string CTDump(System.Collections.Generic.IList<UnityEngine.Quaternion> list)
        {
            var val_28;
            var val_29;
            var val_30;
            var val_31;
            var val_33;
            var val_34;
            var val_35;
            val_28 = list;
            if(val_28 == null)
            {
                    return 0;
            }
            
            System.Text.StringBuilder val_1 = 536893081;
            if(val_1 == 0)
            {
                    throw new NullReferenceException();
            }
            
            val_1 = new System.Text.StringBuilder();
            val_29 = val_28;
            val_30 = 27348040;
            val_28 = val_28;
            label_18:
            val_31 = val_28;
            if((val_28 & 1) == 0)
            {
                goto label_12;
            }
            
            val_33 = val_28;
            if(val_1.Length >= 1)
            {
                    System.Text.StringBuilder val_7 = val_1.Append(value:  System.Environment.NewLine);
            }
            
            System.Text.StringBuilder val_8 = val_1.Append(value:  V0.16B);
            System.Text.StringBuilder val_9 = val_1.Append(value:  -1610611733);
            System.Text.StringBuilder val_10 = val_1.Append(value:  V1.16B);
            System.Text.StringBuilder val_11 = val_1.Append(value:  -1610611733);
            System.Text.StringBuilder val_12 = val_1.Append(value:  V2.16B);
            System.Text.StringBuilder val_13 = val_1.Append(value:  -1610611733);
            System.Text.StringBuilder val_14 = val_1.Append(value:  V3.16B);
            goto label_18;
            label_12:
            if(val_28 == null)
            {
                goto label_41;
            }
            
            label_40:
            val_34 = val_28;
            label_41:
            if(0 != 0)
            {
                goto label_38;
            }
            
            if(6 != 6)
            {
                    if(6 != 0)
            {
                    return 0;
            }
            
            }
            
            val_28 = ???;
            val_30 = ???;
            goto mem[536893081] + 360;
            label_38:
            if(W1 != 1)
            {
                goto label_39;
            }
            
            if(val_28 != null)
            {
                goto label_40;
            }
            
            goto label_41;
            label_39:
            if(val_28 == null)
            {
                goto label_49;
            }
            
            label_48:
            val_35 = val_28;
            label_49:
            if(val_28 != null)
            {
                goto label_48;
            }
            
            goto label_49;
        }
        public static string CTDump(System.Collections.Generic.IList<UnityEngine.Vector2> list)
        {
            var val_22;
            var val_23;
            var val_24;
            var val_25;
            var val_27;
            var val_28;
            var val_29;
            val_22 = list;
            if(val_22 == null)
            {
                    return 0;
            }
            
            System.Text.StringBuilder val_1 = 536893081;
            if(val_1 == 0)
            {
                    throw new NullReferenceException();
            }
            
            val_1 = new System.Text.StringBuilder();
            val_23 = val_22;
            val_24 = 27348040;
            val_22 = val_22;
            label_18:
            val_25 = val_22;
            if((val_22 & 1) == 0)
            {
                goto label_12;
            }
            
            val_27 = val_22;
            if(val_1.Length >= 1)
            {
                    System.Text.StringBuilder val_7 = val_1.Append(value:  System.Environment.NewLine);
            }
            
            System.Text.StringBuilder val_8 = val_1.Append(value:  V0.16B);
            System.Text.StringBuilder val_9 = val_1.Append(value:  -1610611733);
            System.Text.StringBuilder val_10 = val_1.Append(value:  V1.16B);
            goto label_18;
            label_12:
            if(val_22 == null)
            {
                goto label_37;
            }
            
            label_36:
            val_28 = val_22;
            label_37:
            if(0 != 0)
            {
                goto label_34;
            }
            
            if(6 != 6)
            {
                    if(6 != 0)
            {
                    return 0;
            }
            
            }
            
            val_22 = ???;
            val_24 = ???;
            goto mem[536893081] + 360;
            label_34:
            if(W1 != 1)
            {
                goto label_35;
            }
            
            if(val_22 != null)
            {
                goto label_36;
            }
            
            goto label_37;
            label_35:
            if(val_22 == null)
            {
                goto label_45;
            }
            
            label_44:
            val_29 = val_22;
            label_45:
            if(val_22 != null)
            {
                goto label_44;
            }
            
            goto label_45;
        }
        public static string CTDump(System.Collections.Generic.IList<UnityEngine.Vector3> list)
        {
            var val_25;
            var val_26;
            var val_27;
            var val_28;
            var val_30;
            var val_31;
            var val_32;
            val_25 = list;
            if(val_25 == null)
            {
                    return 0;
            }
            
            System.Text.StringBuilder val_1 = 536893081;
            if(val_1 == 0)
            {
                    throw new NullReferenceException();
            }
            
            val_1 = new System.Text.StringBuilder();
            val_26 = val_25;
            val_27 = 27348040;
            val_25 = val_25;
            label_18:
            val_28 = val_25;
            if((val_25 & 1) == 0)
            {
                goto label_12;
            }
            
            val_30 = val_25;
            if(val_1.Length >= 1)
            {
                    System.Text.StringBuilder val_7 = val_1.Append(value:  System.Environment.NewLine);
            }
            
            System.Text.StringBuilder val_8 = val_1.Append(value:  V0.16B);
            System.Text.StringBuilder val_9 = val_1.Append(value:  -1610611733);
            System.Text.StringBuilder val_10 = val_1.Append(value:  V1.16B);
            System.Text.StringBuilder val_11 = val_1.Append(value:  -1610611733);
            System.Text.StringBuilder val_12 = val_1.Append(value:  V2.16B);
            goto label_18;
            label_12:
            if(val_25 == null)
            {
                goto label_39;
            }
            
            label_38:
            val_31 = val_25;
            label_39:
            if(0 != 0)
            {
                goto label_36;
            }
            
            if(6 != 6)
            {
                    if(6 != 0)
            {
                    return 0;
            }
            
            }
            
            val_25 = ???;
            val_27 = ???;
            goto mem[536893081] + 360;
            label_36:
            if(W1 != 1)
            {
                goto label_37;
            }
            
            if(val_25 != null)
            {
                goto label_38;
            }
            
            goto label_39;
            label_37:
            if(val_25 == null)
            {
                goto label_47;
            }
            
            label_46:
            val_32 = val_25;
            label_47:
            if(val_25 != null)
            {
                goto label_46;
            }
            
            goto label_47;
        }
        public static string CTDump(System.Collections.Generic.IList<UnityEngine.Vector4> list)
        {
            var val_28;
            var val_29;
            var val_30;
            var val_31;
            var val_33;
            var val_34;
            var val_35;
            val_28 = list;
            if(val_28 == null)
            {
                    return 0;
            }
            
            System.Text.StringBuilder val_1 = 536893081;
            if(val_1 == 0)
            {
                    throw new NullReferenceException();
            }
            
            val_1 = new System.Text.StringBuilder();
            val_29 = val_28;
            val_30 = 27348040;
            val_28 = val_28;
            label_18:
            val_31 = val_28;
            if((val_28 & 1) == 0)
            {
                goto label_12;
            }
            
            val_33 = val_28;
            if(val_1.Length >= 1)
            {
                    System.Text.StringBuilder val_7 = val_1.Append(value:  System.Environment.NewLine);
            }
            
            System.Text.StringBuilder val_8 = val_1.Append(value:  V0.16B);
            System.Text.StringBuilder val_9 = val_1.Append(value:  -1610611733);
            System.Text.StringBuilder val_10 = val_1.Append(value:  V1.16B);
            System.Text.StringBuilder val_11 = val_1.Append(value:  -1610611733);
            System.Text.StringBuilder val_12 = val_1.Append(value:  V2.16B);
            System.Text.StringBuilder val_13 = val_1.Append(value:  -1610611733);
            System.Text.StringBuilder val_14 = val_1.Append(value:  V3.16B);
            goto label_18;
            label_12:
            if(val_28 == null)
            {
                goto label_41;
            }
            
            label_40:
            val_34 = val_28;
            label_41:
            if(0 != 0)
            {
                goto label_38;
            }
            
            if(6 != 6)
            {
                    if(6 != 0)
            {
                    return 0;
            }
            
            }
            
            val_28 = ???;
            val_30 = ???;
            goto mem[536893081] + 360;
            label_38:
            if(W1 != 1)
            {
                goto label_39;
            }
            
            if(val_28 != null)
            {
                goto label_40;
            }
            
            goto label_41;
            label_39:
            if(val_28 == null)
            {
                goto label_49;
            }
            
            label_48:
            val_35 = val_28;
            label_49:
            if(val_28 != null)
            {
                goto label_48;
            }
            
            goto label_49;
        }
        public static System.Collections.Generic.List<string> CTToString<T>(System.Collections.Generic.IList<T> list)
        {
            var val_5;
            var val_6;
            var val_7;
            var val_8;
            var val_9;
            if(list != null)
            {
                    val_5 = mem[__RuntimeMethodHiddenParam + 56];
                val_5 = __RuntimeMethodHiddenParam + 56;
                if(((__RuntimeMethodHiddenParam + 56 + 306) & 1) == 0)
            {
                    val_5 = val_5;
            }
            
                val_6 = list;
                System.Collections.Generic.List<System.Object> val_2 = 536877495;
                val_2 = new System.Collections.Generic.List<System.Object>(capacity:  list);
                val_7 = mem[__RuntimeMethodHiddenParam + 56 + 16 + 184 + 8];
                val_7 = __RuntimeMethodHiddenParam + 56 + 16 + 184 + 8;
                if(val_7 == 0)
            {
                    val_8 = mem[__RuntimeMethodHiddenParam + 56];
                val_8 = __RuntimeMethodHiddenParam + 56;
                if(((__RuntimeMethodHiddenParam + 56 + 16 + 306) & 1) == 0)
            {
                    val_8 = mem[__RuntimeMethodHiddenParam + 56];
                val_8 = __RuntimeMethodHiddenParam + 56;
            }
            
                val_9 = mem[__RuntimeMethodHiddenParam + 56 + 32];
                val_9 = __RuntimeMethodHiddenParam + 56 + 32;
                if(((__RuntimeMethodHiddenParam + 56 + 32 + 306) & 1) == 0)
            {
                    val_9 = val_9;
            }
            
                val_7 = val_9;
                mem2[0] = val_7;
                var val_3 = (__RuntimeMethodHiddenParam + 56 + 16 + 184) + 8;
            }
            
                val_2.AddRange(collection:  list);
                return (System.Collections.Generic.List<System.String>)val_2;
            }
            
            27342272 = new System.ArgumentNullException(paramName:  27539456);
            throw 27342272;
        }
        public static string CTDump<K, V>(System.Collections.Generic.IDictionary<K, V> dict, string prefix = "", string postfix = "", bool appendNewLine = True, string delimiter = "; ")
        {
            var val_16;
            object val_17;
            var val_18;
            var val_19;
            var val_20;
            var val_22;
            var val_23;
            string val_24;
            var val_25;
            var val_27;
            var val_28;
            val_16 = __RuntimeMethodHiddenParam;
            val_17 = dict;
            if(val_17 == null)
            {
                    return 0;
            }
            
            System.Text.StringBuilder val_1 = 536893081;
            if(val_1 == 0)
            {
                    throw new NullReferenceException();
            }
            
            val_1 = new System.Text.StringBuilder();
            val_18 = mem[__RuntimeMethodHiddenParam + 56];
            val_18 = __RuntimeMethodHiddenParam + 56;
            if(((__RuntimeMethodHiddenParam + 56 + 306) & 1) == 0)
            {
                    val_18 = val_18;
            }
            
            val_19 = val_17;
            val_17 = val_17;
            label_21:
            val_20 = val_17;
            if((val_17 & 1) == 0)
            {
                goto label_13;
            }
            
            val_22 = mem[__RuntimeMethodHiddenParam + 56 + 16];
            val_22 = __RuntimeMethodHiddenParam + 56 + 16;
            if(((__RuntimeMethodHiddenParam + 56 + 16 + 306) & 1) == 0)
            {
                    val_22 = val_22;
            }
            
            val_23 = val_17;
            if(val_1.Length >= 1)
            {
                    val_24 = delimiter;
                if(appendNewLine != false)
            {
                    val_24 = System.Environment.NewLine;
            }
            
                System.Text.StringBuilder val_7 = val_1.Append(value:  val_24);
            }
            
            System.Text.StringBuilder val_8 = val_1.Append(value:  prefix);
            System.Text.StringBuilder val_9 = val_1.Append(value:  -1610605839);
            System.Text.StringBuilder val_10 = val_1.Append(value:  val_17);
            System.Text.StringBuilder val_11 = val_1.Append(value:  -1610611715);
            System.Text.StringBuilder val_12 = val_1.Append(value:  __RuntimeMethodHiddenParam + 56 + 16 + 8);
            System.Text.StringBuilder val_13 = val_1.Append(value:  postfix);
            goto label_21;
            label_13:
            val_16 = 0;
            label_40:
            if(val_17 != null)
            {
                    val_25 = val_17;
            }
            
            if(val_16 != 0)
            {
                goto label_38;
            }
            
            val_17 = ???;
            val_27 = mem[mem[536893081] + 360 + 8];
            val_27 = mem[536893081] + 360 + 8;
            val_16 = ???;
            goto mem[536893081] + 360;
            label_38:
            if(val_27 != 1)
            {
                goto label_39;
            }
            
            goto label_40;
            label_39:
            if(val_17 == 0)
            {
                goto label_48;
            }
            
            label_47:
            var val_17 = val_17;
            var val_16 = val_17 + 298;
            if(val_16 == 0)
            {
                goto label_42;
            }
            
            var val_15 = val_17 + 176;
            val_15 = val_15 + 8;
            label_44:
            if(((val_17 + 176 + 8) + -8) == 536887297)
            {
                goto label_43;
            }
            
            val_16 = val_16 - 1;
            val_15 = val_15 + 16;
            if(((val_17 + 176 + 8) + -8) != 536887297)
            {
                goto label_44;
            }
            
            label_42:
            val_28 = val_17;
            goto label_45;
            label_43:
            val_17 = val_17 + (((val_17 + 176 + 8)) << 4);
            val_28 = val_17 + 312;
            label_45:
            label_48:
            if(val_17 != 0)
            {
                goto label_47;
            }
            
            goto label_48;
        }
        public static void CTAddRange<K, V>(System.Collections.Generic.IDictionary<K, V> dict, System.Collections.Generic.IDictionary<K, V> collection)
        {
            var val_10;
            var val_11;
            var val_12;
            var val_13;
            object val_14;
            var val_15;
            var val_16;
            var val_17;
            var val_18;
            var val_19;
            var val_20;
            var val_21;
            var val_22;
            var val_23;
            string val_24;
            var val_25;
            val_10 = __RuntimeMethodHiddenParam;
            if(dict == null)
            {
                goto label_1;
            }
            
            if(collection == null)
            {
                goto label_2;
            }
            
            val_11 = mem[__RuntimeMethodHiddenParam + 56];
            val_11 = __RuntimeMethodHiddenParam + 56;
            if(((__RuntimeMethodHiddenParam + 56 + 306) & 1) == 0)
            {
                    val_11 = val_11;
            }
            
            val_12 = collection;
            val_13 = 0;
            val_14 = collection;
            label_32:
            val_15 = val_14;
            val_13 = 0;
            if((val_14 & 1) == 0)
            {
                goto label_13;
            }
            
            val_16 = mem[__RuntimeMethodHiddenParam + 56 + 16];
            val_16 = __RuntimeMethodHiddenParam + 56 + 16;
            if(((__RuntimeMethodHiddenParam + 56 + 16 + 306) & 1) == 0)
            {
                    val_16 = val_16;
            }
            
            val_17 = val_14;
            val_13 = 0;
            val_18 = mem[__RuntimeMethodHiddenParam + 56 + 40];
            val_18 = __RuntimeMethodHiddenParam + 56 + 40;
            if(((__RuntimeMethodHiddenParam + 56 + 40 + 306) & 1) == 0)
            {
                    val_18 = val_18;
            }
            
            val_13 = 2;
            val_19 = dict;
            if((dict & 1) == 0)
            {
                goto label_24;
            }
            
            UnityEngine.Debug.LogWarning(message:  System.String.Format(format:  -1610608069, arg0:  val_14));
            goto label_32;
            label_24:
            val_20 = mem[__RuntimeMethodHiddenParam + 56 + 40];
            val_20 = __RuntimeMethodHiddenParam + 56 + 40;
            if(((__RuntimeMethodHiddenParam + 56 + 40 + 306) & 1) == 0)
            {
                    val_20 = val_20;
            }
            
            val_21 = dict;
            goto label_32;
            label_13:
            val_10 = 0;
            label_46:
            if(val_14 != null)
            {
                    val_22 = val_14;
            }
            
            if(val_10 != 0)
            {
                goto label_44;
            }
            
            return;
            label_1:
            val_14 = 27342272;
            val_24 = 27532344;
            goto label_39;
            label_2:
            val_14 = 27342272;
            val_24 = 27530072;
            label_39:
            val_14 = new System.ArgumentNullException(paramName:  val_24);
            val_23 = 27441632;
            throw val_14;
            label_44:
            if(val_23 != 1)
            {
                goto label_45;
            }
            
            goto label_46;
            label_45:
            if(val_14 == 0)
            {
                goto label_54;
            }
            
            label_53:
            var val_11 = 536882453;
            var val_10 = mem[536882751];
            if(val_10 == 0)
            {
                goto label_48;
            }
            
            var val_9 = mem[536882629];
            val_9 = val_9 + 8;
            label_50:
            if(((mem[536882629] + 8) + -8) == X24)
            {
                goto label_49;
            }
            
            val_10 = val_10 - 1;
            val_9 = val_9 + 16;
            if(((mem[536882629] + 8) + -8) != X24)
            {
                goto label_50;
            }
            
            label_48:
            val_25 = val_14;
            goto label_51;
            label_49:
            val_11 = val_11 + (((mem[536882629] + 8)) << 4);
            val_25 = val_11 + 312;
            label_51:
            label_54:
            if(val_14 != 0)
            {
                goto label_53;
            }
            
            goto label_54;
        }
        public static byte[] CTReadFully(System.IO.Stream input)
        {
            var val_5;
            System.IO.Stream val_6;
            var val_7;
            var val_8;
            var val_9;
            val_5 = input;
            if(val_5 == null)
            {
                goto label_1;
            }
            
            System.IO.MemoryStream val_1 = 536889459;
            val_6 = val_1;
            val_1 = new System.IO.MemoryStream();
            val_5.CopyTo(destination:  val_6);
            val_5 = 0;
            label_10:
            var val_5 = mem[536889459];
            var val_4 = mem[536889459] + 298;
            if(val_4 == 0)
            {
                goto label_3;
            }
            
            var val_3 = mem[536889459] + 176;
            val_3 = val_3 + 8;
            label_5:
            if(((mem[536889459] + 176 + 8) + -8) == 536887297)
            {
                goto label_4;
            }
            
            val_4 = val_4 - 1;
            val_3 = val_3 + 16;
            if(((mem[536889459] + 176 + 8) + -8) != 536887297)
            {
                goto label_5;
            }
            
            label_3:
            val_7 = val_6;
            goto label_6;
            label_4:
            val_5 = val_5 + (((mem[536889459] + 176 + 8)) << 4);
            val_7 = val_5 + 312;
            label_6:
            val_8 = mem[((mem[536889459] + ((mem[536889459] + 176 + 8)) << 4) + 312) + 8];
            val_8 = ((mem[536889459] + ((mem[536889459] + 176 + 8)) << 4) + 312) + 8;
            if(val_5 != 0)
            {
                goto label_8;
            }
            
            return (Unknown)val_6;
            label_1:
            val_6 = 27342272;
            val_6 = new System.ArgumentNullException(paramName:  27537336);
            val_8 = 27441872;
            throw val_6;
            label_8:
            if(val_8 != 1)
            {
                goto label_9;
            }
            
            goto label_10;
            label_9:
            label_16:
            var val_7 = mem[536882751];
            if(val_7 == 0)
            {
                goto label_11;
            }
            
            var val_6 = mem[536882629];
            val_6 = val_6 + 8;
            label_13:
            if(((mem[536882629] + 8) + -8) == X22)
            {
                goto label_12;
            }
            
            val_7 = val_7 - 1;
            val_6 = val_6 + 16;
            if(((mem[536882629] + 8) + -8) != X22)
            {
                goto label_13;
            }
            
            label_11:
            val_9 = val_6;
            goto label_14;
            label_12:
            val_6 = val_6 + (((mem[536882629] + 8)) << 4);
            val_9 = val_6 + 312;
            label_14:
            if(0 != 0)
            {
                goto label_16;
            }
            
            goto label_16;
        }
        public static string CTToHexRGB(UnityEngine.Color32 input)
        {
            if(mem[536886147] != 0)
            {
                    return UnityEngine.ColorUtility.ToHtmlStringRGB(color:  new UnityEngine.Color() {r = ((float)input.r & 255) / 255f, g = ((float)(uint)(input.r >> 8) & 255) / 255f, b = ((float)(uint)(input.r >> 16) & 255) / 255f, a = ((float)(ulong)(input.r >> 24) & 255) / 255f});
            }
            
            return UnityEngine.ColorUtility.ToHtmlStringRGB(color:  new UnityEngine.Color() {r = ((float)input.r & 255) / 255f, g = ((float)(uint)(input.r >> 8) & 255) / 255f, b = ((float)(uint)(input.r >> 16) & 255) / 255f, a = ((float)(ulong)(input.r >> 24) & 255) / 255f});
        }
        public static string CTToHexRGB(UnityEngine.Color input)
        {
            return UnityEngine.ColorUtility.ToHtmlStringRGB(color:  new UnityEngine.Color() {r = input.r, g = input.g, b = input.b, a = input.a});
        }
        public static string CTToHexRGBA(UnityEngine.Color32 input)
        {
            if(mem[536886147] != 0)
            {
                    return UnityEngine.ColorUtility.ToHtmlStringRGBA(color:  new UnityEngine.Color() {r = ((float)input.r & 255) / 255f, g = ((float)(uint)(input.r >> 8) & 255) / 255f, b = ((float)(uint)(input.r >> 16) & 255) / 255f, a = ((float)(ulong)(input.r >> 24) & 255) / 255f});
            }
            
            return UnityEngine.ColorUtility.ToHtmlStringRGBA(color:  new UnityEngine.Color() {r = ((float)input.r & 255) / 255f, g = ((float)(uint)(input.r >> 8) & 255) / 255f, b = ((float)(uint)(input.r >> 16) & 255) / 255f, a = ((float)(ulong)(input.r >> 24) & 255) / 255f});
        }
        public static string CTToHexRGBA(UnityEngine.Color input)
        {
            return UnityEngine.ColorUtility.ToHtmlStringRGBA(color:  new UnityEngine.Color() {r = input.r, g = input.g, b = input.b, a = input.a});
        }
        public static UnityEngine.Vector3 CTVector3(UnityEngine.Color32 color)
        {
            if(mem[536886147] != 0)
            {
                    return new UnityEngine.Vector3() {x = ((float)color.r & 255) / 255f, y = ((float)(uint)(color.r >> 8) & 255) / 255f, z = ((float)(uint)(color.r >> 16) & 255) / 255f};
            }
            
            return new UnityEngine.Vector3() {x = ((float)color.r & 255) / 255f, y = ((float)(uint)(color.r >> 8) & 255) / 255f, z = ((float)(uint)(color.r >> 16) & 255) / 255f};
        }
        public static UnityEngine.Vector3 CTVector3(UnityEngine.Color color)
        {
            return new UnityEngine.Vector3() {x = color.r, y = color.g, z = color.b};
        }
        public static UnityEngine.Vector4 CTVector4(UnityEngine.Color32 color)
        {
            if(mem[536886147] != 0)
            {
                    return new UnityEngine.Vector4() {x = ((float)color.r & 255) / 255f, y = ((float)(uint)(color.r >> 8) & 255) / 255f, z = ((float)(uint)(color.r >> 16) & 255) / 255f, w = ((float)(ulong)(color.r >> 24) & 255) / 255f};
            }
            
            return new UnityEngine.Vector4() {x = ((float)color.r & 255) / 255f, y = ((float)(uint)(color.r >> 8) & 255) / 255f, z = ((float)(uint)(color.r >> 16) & 255) / 255f, w = ((float)(ulong)(color.r >> 24) & 255) / 255f};
        }
        public static UnityEngine.Vector4 CTVector4(UnityEngine.Color color)
        {
            return new UnityEngine.Vector4() {x = color.r, y = color.g, z = color.b, w = color.a};
        }
        public static UnityEngine.Vector2 CTMultiply(UnityEngine.Vector2 a, UnityEngine.Vector2 b)
        {
            float val_1 = S0 * S2;
            float val_2 = S1 * S3;
            return (UnityEngine.Vector2)a;
        }
        public static UnityEngine.Vector3 CTMultiply(UnityEngine.Vector3 a, UnityEngine.Vector3 b)
        {
            a.x = a.x * b.x;
            a.y = a.y * b.y;
            a.z = a.z * b.z;
            return new UnityEngine.Vector3() {x = a.x, y = a.y, z = a.z};
        }
        public static UnityEngine.Vector3 CTFlatten(UnityEngine.Vector3 a)
        {
            if(mem[536886147] == 0)
            {
                    536885923 = 536885923;
            }
            
            float val_3 = mem[536886107];
            float val_1 = mem[536886107] + 4;
            float val_2 = mem[536886107] + 8;
            val_1 = a.y * val_1;
            val_2 = a.z * val_2;
            val_3 = a.x * val_3;
            return new UnityEngine.Vector3() {x = val_3, y = val_1, z = val_2};
        }
        public static UnityEngine.Quaternion CTQuaternion(UnityEngine.Vector3 eulerAngle)
        {
            eulerAngle.x = eulerAngle.x * 0.01745329f;
            eulerAngle.y = eulerAngle.y * 0.01745329f;
            eulerAngle.z = eulerAngle.z * 0.01745329f;
            return UnityEngine.Quaternion.Internal_FromEulerRad(euler:  new UnityEngine.Vector3() {x = eulerAngle.x, y = eulerAngle.y, z = eulerAngle.z});
        }
        public static UnityEngine.Color CTColorRGB(UnityEngine.Vector3 rgb, float alpha = 1)
        {
            return new UnityEngine.Color() {r = (rgb.x >= 0) ? rgb.x : 0f, g = (rgb.y >= 0) ? (S6) : 0f, b = (rgb.z >= 0) ? (S7) : 0f, a = (alpha >= 0) ? 1f : 0f};
        }
        public static UnityEngine.Vector4 CTMultiply(UnityEngine.Vector4 a, UnityEngine.Vector4 b)
        {
            a.x = a.x * b.x;
            a.y = a.y * b.y;
            a.z = a.z * b.z;
            a.w = a.w * b.w;
            return new UnityEngine.Vector4() {x = a.x, y = a.y, z = a.z, w = a.w};
        }
        public static UnityEngine.Quaternion CTQuaternion(UnityEngine.Vector4 angle)
        {
            return new UnityEngine.Quaternion() {x = angle.x, y = angle.y, z = angle.z, w = angle.w};
        }
        public static UnityEngine.Color CTColorRGBA(UnityEngine.Vector4 rgba)
        {
            return new UnityEngine.Color() {r = (rgba.x >= 0) ? rgba.x : 0f, g = (rgba.y >= 0) ? (S6) : 0f, b = (rgba.z >= 0) ? (S7) : 0f, a = (rgba.w >= 0) ? 1f : 0f};
        }
        public static UnityEngine.Vector3 CTVector3(UnityEngine.Quaternion angle)
        {
            UnityEngine.Vector3 val_1 = UnityEngine.Quaternion.Internal_ToEulerRad(rotation:  new UnityEngine.Quaternion() {x = angle.x, y = angle.y, z = angle.z, w = angle.w});
            val_1.x = val_1.x * 57.29578f;
            val_1.y = val_1.y * 57.29578f;
            val_1.z = val_1.z * 57.29578f;
            return UnityEngine.Quaternion.Internal_MakePositive(euler:  new UnityEngine.Vector3() {x = val_1.x, y = val_1.y, z = val_1.z});
        }
        public static UnityEngine.Vector4 CTVector4(UnityEngine.Quaternion angle)
        {
            return new UnityEngine.Vector4() {x = angle.x, y = angle.y, z = angle.z, w = angle.w};
        }
        public static UnityEngine.Vector3 CTCorrectLossyScale(UnityEngine.Canvas canvas)
        {
            if(canvas != 0)
            {
                    if(UnityEngine.Application.isPlaying == false)
            {
                    return new UnityEngine.Vector3() {x = val_12.x, y = val_12.y, z = val_12.z};
            }
            
                if(canvas.renderMode == 1)
            {
                    27351912 = canvas.GetComponent<System.Object>();
                if((UnityEngine.Object.op_Implicit(exists:  27351912)) == false)
            {
                    return new UnityEngine.Vector3() {x = val_12.x, y = val_12.y, z = val_12.z};
            }
            
                if(27351912.enabled == false)
            {
                    return new UnityEngine.Vector3() {x = val_12.x, y = val_12.y, z = val_12.z};
            }
            
                27351912.enabled = false;
                UnityEngine.Vector3 val_8 = canvas.GetComponent<System.Object>().lossyScale;
                27351912.enabled = true;
                UnityEngine.Vector3 val_10 = canvas.GetComponent<System.Object>().lossyScale;
                val_10.x = val_10.x / val_8.x;
                val_10.y = val_10.y / val_8.y;
                val_10.z = val_10.z / val_8.z;
                return new UnityEngine.Vector3() {x = val_12.x, y = val_12.y, z = val_12.z};
            }
            
                UnityEngine.Vector3 val_12 = canvas.GetComponent<System.Object>().lossyScale;
                return new UnityEngine.Vector3() {x = val_12.x, y = val_12.y, z = val_12.z};
            }
            
            27342272 = new System.ArgumentNullException(paramName:  27529504);
            throw 27342272;
        }
        public static void CTGetLocalCorners(UnityEngine.RectTransform transform, UnityEngine.Vector3[] fourCornersArray, UnityEngine.Canvas canvas, float inset = 0, bool corrected = False)
        {
            System.ArgumentNullException val_7;
            string val_8;
            if(transform == 0)
            {
                goto label_2;
            }
            
            if(fourCornersArray == null)
            {
                goto label_3;
            }
            
            if(canvas == 0)
            {
                goto label_5;
            }
            
            transform.GetLocalCorners(fourCornersArray:  fourCornersArray);
            if(corrected == false)
            {
                goto label_7;
            }
            
            UnityEngine.Vector3 val_3 = Crosstales.ExtensionMethods.CTCorrectLossyScale(canvas:  canvas);
            if(fourCornersArray.Length == 0)
            {
                goto label_18;
            }
            
            fourCornersArray[0] = fourCornersArray[0] / val_3.x;
            if(fourCornersArray.Length == 1)
            {
                goto label_18;
            }
            
            UnityEngine.Vector3 val_8 = fourCornersArray[1];
            val_8 = val_8 / val_3.x;
            fourCornersArray[1] = val_8;
            if(fourCornersArray.Length <= 2)
            {
                goto label_18;
            }
            
            UnityEngine.Vector3 val_9 = fourCornersArray[3];
            val_9 = val_9 / val_3.x;
            fourCornersArray[3] = val_9;
            if(fourCornersArray.Length == 3)
            {
                goto label_18;
            }
            
            val_3.x = fourCornersArray[4] / val_3.x;
            fourCornersArray[4] = val_3.x;
            label_7:
            if(inset == 0f)
            {
                    return;
            }
            
            UnityEngine.Vector3 val_5 = Crosstales.ExtensionMethods.CTCorrectLossyScale(canvas:  canvas);
            if(fourCornersArray.Length != 0)
            {
                    UnityEngine.Vector3 val_11 = fourCornersArray[0];
                UnityEngine.Vector3 val_12 = fourCornersArray[0];
                val_5.x = val_5.x * inset;
                val_5.y = val_5.y * inset;
                val_11 = val_5.x + val_11;
                val_12 = val_5.y + val_12;
                fourCornersArray[0] = val_11;
                fourCornersArray[0] = val_12;
                if(fourCornersArray.Length != 1)
            {
                    UnityEngine.Vector3 val_13 = fourCornersArray[1];
                UnityEngine.Vector3 val_14 = fourCornersArray[2];
                val_13 = val_5.x + val_13;
                val_14 = val_14 - val_5.y;
                fourCornersArray[1] = val_13;
                fourCornersArray[2] = val_14;
                if(fourCornersArray.Length > 2)
            {
                    UnityEngine.Vector3 val_15 = fourCornersArray[3];
                UnityEngine.Vector3 val_16 = fourCornersArray[3];
                val_15 = val_15 - val_5.x;
                val_16 = val_16 - val_5.y;
                fourCornersArray[3] = val_15;
                fourCornersArray[3] = val_16;
                if(fourCornersArray.Length != 3)
            {
                    val_5.x = fourCornersArray[4] - val_5.x;
                val_5.y = val_5.y + fourCornersArray[5];
                fourCornersArray[4] = val_5.x;
                fourCornersArray[5] = val_5.y;
                return;
            }
            
            }
            
            }
            
            }
            
            label_18:
            label_2:
            val_7 = 27342272;
            val_8 = 27546704;
            goto label_20;
            label_3:
            val_7 = 27342272;
            val_8 = 27534856;
            goto label_20;
            label_5:
            val_7 = 27342272;
            val_8 = 27529504;
            label_20:
            val_7 = new System.ArgumentNullException(paramName:  val_8);
            throw val_7;
        }
        public static UnityEngine.Vector3[] CTGetLocalCorners(UnityEngine.RectTransform transform, UnityEngine.Canvas canvas, float inset = 0, bool corrected = False)
        {
            Crosstales.ExtensionMethods.CTGetLocalCorners(transform:  transform, fourCornersArray:  536881655, canvas:  canvas, inset:  inset, corrected:  corrected);
            return 536881655;
        }
        public static void CTGetScreenCorners(UnityEngine.RectTransform transform, UnityEngine.Vector3[] fourCornersArray, UnityEngine.Canvas canvas, float inset = 0, bool corrected = False)
        {
            UnityEngine.Vector3 val_10;
            UnityEngine.Vector3 val_11;
            System.ArgumentNullException val_12;
            string val_13;
            if(transform == 0)
            {
                goto label_2;
            }
            
            if(fourCornersArray == null)
            {
                goto label_3;
            }
            
            if(canvas == 0)
            {
                goto label_5;
            }
            
            transform.GetWorldCorners(fourCornersArray:  fourCornersArray);
            if(canvas.renderMode == 1)
            {
                    var val_10 = 0;
                do
            {
                if(val_10 >= fourCornersArray.Length)
            {
                    throw new NullReferenceException();
            }
            
                UnityEngine.Vector3 val_5 = canvas.worldCamera.WorldToScreenPoint(position:  new UnityEngine.Vector3() {x = 4.141032E-26f, y = 4.141032E-26f, z = 4.141032E-26f});
                if(val_10 >= fourCornersArray.Length)
            {
                    throw new NullReferenceException();
            }
            
                val_10 = val_10 + 1;
                mem2[0] = val_5.x;
                mem2[0] = val_5.y;
                mem2[0] = 0;
            }
            while(val_10 != 4);
            
            }
            
            if(corrected != false)
            {
                    UnityEngine.Vector3 val_6 = Crosstales.ExtensionMethods.CTCorrectLossyScale(canvas:  canvas);
                if(fourCornersArray.Length == 0)
            {
                    throw new NullReferenceException();
            }
            
                fourCornersArray[0] = fourCornersArray[0] / val_6.x;
                if(fourCornersArray.Length == 1)
            {
                    throw new NullReferenceException();
            }
            
                UnityEngine.Vector3 val_12 = fourCornersArray[1];
                val_12 = val_12 / val_6.x;
                fourCornersArray[1] = val_12;
                if(fourCornersArray.Length <= 2)
            {
                    throw new NullReferenceException();
            }
            
                UnityEngine.Vector3 val_13 = fourCornersArray[3];
                val_13 = val_13 / val_6.x;
                fourCornersArray[3] = val_13;
                if(fourCornersArray.Length == 3)
            {
                    throw new NullReferenceException();
            }
            
                val_11 = fourCornersArray[4];
                val_10 = val_11 / val_6.x;
                fourCornersArray[4] = val_10;
            }
            
            if(inset == 0f)
            {
                    return;
            }
            
            UnityEngine.Vector3 val_8 = Crosstales.ExtensionMethods.CTCorrectLossyScale(canvas:  canvas);
            if(fourCornersArray.Length == 0)
            {
                    throw new NullReferenceException();
            }
            
            UnityEngine.Vector3 val_14 = fourCornersArray[0];
            UnityEngine.Vector3 val_15 = fourCornersArray[0];
            val_8.x = val_8.x * inset;
            val_8.y = val_8.y * inset;
            val_14 = val_8.x + val_14;
            val_15 = val_8.y + val_15;
            fourCornersArray[0] = val_14;
            fourCornersArray[0] = val_15;
            if(fourCornersArray.Length == 1)
            {
                    throw new NullReferenceException();
            }
            
            UnityEngine.Vector3 val_16 = fourCornersArray[1];
            UnityEngine.Vector3 val_17 = fourCornersArray[2];
            val_16 = val_8.x + val_16;
            val_17 = val_17 - val_8.y;
            fourCornersArray[1] = val_16;
            fourCornersArray[2] = val_17;
            if(fourCornersArray.Length <= 2)
            {
                    throw new NullReferenceException();
            }
            
            UnityEngine.Vector3 val_18 = fourCornersArray[3];
            UnityEngine.Vector3 val_19 = fourCornersArray[3];
            val_18 = val_18 - val_8.x;
            val_19 = val_19 - val_8.y;
            fourCornersArray[3] = val_18;
            fourCornersArray[3] = val_19;
            if(fourCornersArray.Length == 3)
            {
                    throw new NullReferenceException();
            }
            
            val_8.x = fourCornersArray[4] - val_8.x;
            val_8.y = val_8.y + fourCornersArray[5];
            fourCornersArray[4] = val_8.x;
            fourCornersArray[5] = val_8.y;
            return;
            label_2:
            val_12 = 27342272;
            val_13 = 27546704;
            goto label_26;
            label_3:
            val_12 = 27342272;
            val_13 = 27534856;
            goto label_26;
            label_5:
            val_12 = 27342272;
            val_13 = 27529504;
            label_26:
            val_12 = new System.ArgumentNullException(paramName:  val_13);
            throw val_12;
        }
        public static UnityEngine.Vector3[] CTGetScreenCorners(UnityEngine.RectTransform transform, UnityEngine.Canvas canvas, float inset = 0, bool corrected = False)
        {
            Crosstales.ExtensionMethods.CTGetScreenCorners(transform:  transform, fourCornersArray:  536881655, canvas:  canvas, inset:  inset, corrected:  corrected);
            return 536881655;
        }
        public static UnityEngine.Bounds CTGetBounds(UnityEngine.RectTransform transform, float uiScaleFactor = 1)
        {
            float val_18;
            float val_19;
            object val_24;
            UnityEngine.Object val_25;
            var val_26;
            var val_27;
            System.Func<Unknown, Unknown> val_28;
            var val_29;
            var val_30;
            float val_31;
            var val_32;
            var val_33;
            var val_34;
            var val_35;
            UnityEngine.Bounds val_0;
            val_24 = 27362096;
            val_25 = transform;
            object val_1 = 536898641;
            if(val_1 == 0)
            {
                    throw new NullReferenceException();
            }
            
            val_26 = 27351912;
            val_24 = val_1;
            val_1 = new System.Object();
            mem[536898657] = uiScaleFactor;
            if(val_25 == 0)
            {
                goto label_3;
            }
            
            if(val_25 == null)
            {
                    throw new NullReferenceException();
            }
            
            UnityEngine.Vector2 val_3 = val_25.anchoredPosition;
            UnityEngine.Rect val_4 = val_25.rect;
            UnityEngine.Bounds val_10 = new UnityEngine.Bounds(center:  new UnityEngine.Vector3() {x = uiScaleFactor, y = V1.16B, z = 0f}, size:  new UnityEngine.Vector3() {x = val_4.m_XMin.width * mem[536898657], y = val_4.m_XMin.height * mem[536898657], z = mem[536898657] * 0f});
            if(val_25.childCount < 1)
            {
                goto label_30;
            }
            
            val_27 = val_24;
            val_28 = mem[536898665];
            val_25 = System.Linq.Enumerable.Cast<System.Object>(source:  val_25);
            if(val_28 == 0)
            {
                    System.Func<System.Object, UnityEngine.Bounds> val_13 = 536903181;
                if(val_13 == 0)
            {
                    throw new NullReferenceException();
            }
            
                val_28 = val_13;
                val_13 = new System.Func<System.Object, UnityEngine.Bounds>(object:  val_24, method:  1610682835);
                mem[536898665] = val_28;
            }
            
            System.Collections.Generic.IEnumerable<Unknown> val_14 = System.Linq.Enumerable.Select<System.Object, UnityEngine.Bounds>(source:  val_25, selector:  val_28);
            if(val_14 == null)
            {
                    throw new NullReferenceException();
            }
            
            val_29 = val_14;
            val_27 = 27348040;
            val_25 = val_14;
            label_23:
            val_30 = val_25;
            if((val_25 & 1) == 0)
            {
                goto label_18;
            }
            
            val_32 = val_25;
            val_10.m_Center.x.Encapsulate(bounds:  new UnityEngine.Bounds() {m_Center = new UnityEngine.Vector3() {x = val_18, y = val_18, z = val_18}, m_Extents = new UnityEngine.Vector3() {x = val_18, y = val_19, z = val_19}});
            goto label_23;
            label_18:
            val_24 = 0;
            val_26 = 5;
            if(val_25 == null)
            {
                goto label_37;
            }
            
            label_36:
            val_33 = val_25;
            label_37:
            if(val_24 != 0)
            {
                goto label_34;
            }
            
            if(5 != 5)
            {
                    if(5 != 0)
            {
                    return val_0;
            }
            
            }
            
            label_30:
            val_31 = val_10.m_Extents.y;
            val_0.m_Extents.y = val_31;
            val_0.m_Center.x = val_10.m_Center.x;
            return val_0;
            label_3:
            27342272 = new System.ArgumentNullException(paramName:  27546704);
            val_34 = 27441768;
            throw 27342272;
            label_34:
            if(val_34 != 1)
            {
                goto label_35;
            }
            
            if(val_25 != null)
            {
                goto label_36;
            }
            
            goto label_37;
            label_35:
            if(val_25 == null)
            {
                goto label_45;
            }
            
            label_44:
            val_35 = val_25;
            label_45:
            if(val_25 != null)
            {
                goto label_44;
            }
            
            goto label_45;
        }
        public static void CTSetLeft(UnityEngine.RectTransform transform, float value)
        {
            if(transform != 0)
            {
                    UnityEngine.Vector2 val_2 = transform.offsetMin;
                transform.offsetMin = new UnityEngine.Vector2();
                return;
            }
            
            27342272 = new System.ArgumentNullException(paramName:  27546704);
            throw 27342272;
        }
        public static void CTSetRight(UnityEngine.RectTransform transform, float value)
        {
            if(transform != 0)
            {
                    UnityEngine.Vector2 val_2 = transform.offsetMax;
                transform.offsetMax = new UnityEngine.Vector2();
                return;
            }
            
            27342272 = new System.ArgumentNullException(paramName:  27546704);
            throw 27342272;
        }
        public static void CTSetTop(UnityEngine.RectTransform transform, float value)
        {
            if(transform != 0)
            {
                    UnityEngine.Vector2 val_2 = transform.offsetMax;
                transform.offsetMax = new UnityEngine.Vector2();
                return;
            }
            
            27342272 = new System.ArgumentNullException(paramName:  27546704);
            throw 27342272;
        }
        public static void CTSetBottom(UnityEngine.RectTransform transform, float value)
        {
            if(transform != 0)
            {
                    UnityEngine.Vector2 val_2 = transform.offsetMin;
                transform.offsetMin = new UnityEngine.Vector2();
                return;
            }
            
            27342272 = new System.ArgumentNullException(paramName:  27546704);
            throw 27342272;
        }
        public static float CTGetLeft(UnityEngine.RectTransform transform)
        {
            if(transform != 0)
            {
                    return transform.offsetMin;
            }
            
            27342272 = new System.ArgumentNullException(paramName:  27546704);
            throw 27342272;
        }
        public static float CTGetRight(UnityEngine.RectTransform transform)
        {
            if(transform != 0)
            {
                    return transform.offsetMax;
            }
            
            27342272 = new System.ArgumentNullException(paramName:  27546704);
            throw 27342272;
        }
        public static float CTGetTop(UnityEngine.RectTransform transform)
        {
            if(transform != 0)
            {
                    UnityEngine.Vector2 val_2 = transform.offsetMax;
                return (float)V1.16B;
            }
            
            27342272 = new System.ArgumentNullException(paramName:  27546704);
            throw 27342272;
        }
        public static float CTGetBottom(UnityEngine.RectTransform transform)
        {
            if(transform != 0)
            {
                    UnityEngine.Vector2 val_2 = transform.offsetMin;
                return (float)V1.16B;
            }
            
            27342272 = new System.ArgumentNullException(paramName:  27546704);
            throw 27342272;
        }
        public static UnityEngine.Vector4 CTGetLRTB(UnityEngine.RectTransform transform)
        {
            if(transform != 0)
            {
                    UnityEngine.Vector2 val_2 = transform.offsetMin;
                UnityEngine.Vector2 val_3 = transform.offsetMax;
                UnityEngine.Vector2 val_4 = transform.offsetMin;
                return new UnityEngine.Vector4() {x = V0.16B, y = V0.16B, z = V1.16B, w = V1.16B};
            }
            
            27342272 = new System.ArgumentNullException(paramName:  27546704);
            throw 27342272;
        }
        public static void CTSetLRTB(UnityEngine.RectTransform transform, UnityEngine.Vector4 lrtb)
        {
            if(transform != 0)
            {
                    transform.offsetMin = new UnityEngine.Vector2();
                transform.offsetMax = new UnityEngine.Vector2();
                return;
            }
            
            27342272 = new System.ArgumentNullException(paramName:  27546704);
            throw 27342272;
        }
        public static System.Collections.Generic.List<UnityEngine.GameObject> CTFindAll(UnityEngine.Component component, string name, int maxDepth = 0)
        {
            var val_7;
            var val_8;
            System.ArgumentNullException val_18;
            string val_19;
            object val_1 = 536898643;
            val_1 = new System.Object();
            mem[536898659] = name;
            if(component == 0)
            {
                goto label_3;
            }
            
            if(mem[536898659] == 0)
            {
                goto label_4;
            }
            
            System.Collections.Generic.List<System.Object> val_3 = 536877269;
            val_3 = new System.Collections.Generic.List<System.Object>();
            System.Collections.Generic.List<T>.System.Collections.Generic.List.Enumerator<Unknown> val_6 = Crosstales.ExtensionMethods.getAllChildren(parent:  component.transform, maxDepth:  maxDepth, transformList:  0, depth:  0).GetEnumerator();
            label_14:
            if(val_7.MoveNext() == false)
            {
                goto label_9;
            }
            
            if(val_8 == 0)
            {
                    throw new NullReferenceException();
            }
            
            var val_17 = mem[536877297];
            val_17 = val_17 + 1;
            mem[536877297] = val_17;
            if(mem[536877285] == 0)
            {
                    throw new NullReferenceException();
            }
            
            if(mem[536877293] >= (mem[536877285] + 24))
            {
                goto label_14;
            }
            
            var val_12 = mem[536877285] + ((mem[536877293]) << 3);
            mem[536877293] = mem[536877293] + 1;
            mem2[0] = val_8.gameObject;
            goto label_14;
            label_9:
            val_7.Dispose();
            System.Func<System.Object, System.Boolean> val_13 = 536903137;
            val_13 = new System.Func<System.Object, System.Boolean>(object:  val_1, method:  1610682839);
            return (System.Collections.Generic.List<UnityEngine.GameObject>)System.Linq.Enumerable.ToList<System.Object>(source:  System.Linq.Enumerable.Where<System.Object>(source:  val_3, predicate:  val_13));
            label_3:
            val_18 = 27342272;
            val_19 = 27530544;
            goto label_16;
            label_4:
            val_18 = 27342272;
            val_19 = 27540864;
            label_16:
            val_18 = new System.ArgumentNullException(paramName:  val_19);
            throw val_18;
        }
        public static System.Collections.Generic.List<T> CTFindAll<T>(UnityEngine.Component component, string name)
        {
            var val_3;
            System.ArgumentNullException val_4;
            string val_5;
            mem2[0] = name;
            if(component == 0)
            {
                goto label_4;
            }
            
            if((__RuntimeMethodHiddenParam + 56 + 16) == 0)
            {
                goto label_5;
            }
            
            val_3 = mem[__RuntimeMethodHiddenParam + 56 + 32];
            val_3 = __RuntimeMethodHiddenParam + 56 + 32;
            if(((__RuntimeMethodHiddenParam + 56 + 32 + 306) & 1) != 0)
            {
                goto __RuntimeMethodHiddenParam + 56 + 56 + 8;
            }
            
            val_3 = val_3;
            goto __RuntimeMethodHiddenParam + 56 + 56 + 8;
            label_4:
            val_4 = 27342272;
            val_5 = 27530544;
            goto label_9;
            label_5:
            val_4 = 27342272;
            val_5 = 27540864;
            label_9:
            val_4 = new System.ArgumentNullException(paramName:  val_5);
            throw val_4;
        }
        public static UnityEngine.GameObject CTFind(UnityEngine.MonoBehaviour mb, string name)
        {
            if(mb != 0)
            {
                    return Crosstales.ExtensionMethods.CTFind(transform:  mb.transform, name:  name).gameObject;
            }
            
            27342272 = new System.ArgumentNullException(paramName:  27540120);
            throw 27342272;
        }
        public static T CTFind<T>(UnityEngine.MonoBehaviour mb, string name)
        {
            if(mb != 0)
            {
                    UnityEngine.Transform val_2 = mb.transform;
                if(mem[536886147] != 0)
            {
                goto __RuntimeMethodHiddenParam + 56 + 8;
            }
            
            }
            else
            {
                    27342272 = new System.ArgumentNullException(paramName:  27540120);
                throw 27342272;
            }
        
        }
        public static UnityEngine.GameObject CTFind(UnityEngine.GameObject go, string name)
        {
            if(go != 0)
            {
                    return Crosstales.ExtensionMethods.CTFind(transform:  go.transform, name:  name).gameObject;
            }
            
            27342272 = new System.ArgumentNullException(paramName:  27535672);
            throw 27342272;
        }
        public static T CTFind<T>(UnityEngine.GameObject go, string name)
        {
            if(go != 0)
            {
                    UnityEngine.Transform val_2 = go.transform;
                if(mem[536886147] != 0)
            {
                goto __RuntimeMethodHiddenParam + 56 + 8;
            }
            
            }
            else
            {
                    27342272 = new System.ArgumentNullException(paramName:  27535672);
                throw 27342272;
            }
        
        }
        public static UnityEngine.Bounds CTGetBounds(UnityEngine.GameObject go)
        {
            float val_4;
            float val_5;
            var val_12;
            float val_14;
            UnityEngine.Bounds val_0;
            if(go == 0)
            {
                goto label_2;
            }
            
            val_12 = go.GetComponentsInChildren<System.Object>();
            if(val_2.Length == 0)
            {
                goto label_5;
            }
            
            if(val_2.Length == 0)
            {
                goto label_9;
            }
            
            UnityEngine.Bounds val_3 = val_12[0].bounds;
            if(val_2.Length < 1)
            {
                goto label_8;
            }
            
            var val_12 = 0;
            label_11:
            if(val_12 >= val_2.Length)
            {
                goto label_9;
            }
            
            UnityEngine.Bounds val_6 = 1152921504967629104.bounds;
            val_4.Encapsulate(bounds:  new UnityEngine.Bounds() {m_Center = new UnityEngine.Vector3() {x = val_4, y = val_4, z = val_4}, m_Extents = new UnityEngine.Vector3() {x = val_4, y = val_5, z = val_5}});
            val_12 = val_12 + 1;
            if(val_12 < val_2.Length)
            {
                goto label_11;
            }
            
            label_8:
            val_14 = val_5;
            val_0.m_Extents.y = val_14;
            val_0.m_Center.x = val_4;
            return val_0;
            label_5:
            UnityEngine.Vector3 val_8 = go.transform.position;
            val_14 = mem[536895737];
            val_0.m_Center.x = 0f;
            val_0.m_Center.y = 0f;
            val_0.m_Center.z = 0f;
            val_0.m_Extents.x = 0f;
            val_0.m_Extents.y = 0f;
            val_0.m_Extents.z = 0f;
            val_0 = new UnityEngine.Bounds(center:  new UnityEngine.Vector3() {x = val_8.x, y = val_8.y, z = val_8.z}, size:  new UnityEngine.Vector3() {x = val_14, y = mem[536895737] + 4, z = mem[536895737] + 8});
            return val_0;
            label_9:
            label_2:
            27342272 = new System.ArgumentNullException(paramName:  27535672);
            throw 27342272;
        }
        public static UnityEngine.Transform CTFind(UnityEngine.Transform transform, string name)
        {
            System.ArgumentNullException val_3;
            string val_4;
            if(transform == 0)
            {
                goto label_2;
            }
            
            if(name == null)
            {
                goto label_3;
            }
            
            if(mem[536886147] != 0)
            {
                    return Crosstales.ExtensionMethods.deepSearch(parent:  transform, name:  name);
            }
            
            return Crosstales.ExtensionMethods.deepSearch(parent:  transform, name:  name);
            label_2:
            val_3 = 27342272;
            val_4 = 27546704;
            goto label_5;
            label_3:
            val_3 = 27342272;
            val_4 = 27540864;
            label_5:
            val_3 = new System.ArgumentNullException(paramName:  val_4);
            throw val_3;
        }
        public static T CTFind<T>(UnityEngine.Transform transform, string name)
        {
            var val_12;
            UnityEngine.Object val_13;
            val_12 = 27351912;
            if(transform != 0)
            {
                    val_13 = Crosstales.ExtensionMethods.CTFind(transform:  transform, name:  name);
                if(val_13 == 0)
            {
                    return 0;
            }
            
                UnityEngine.GameObject val_4 = val_13.gameObject;
                val_13 = ???;
                val_12 = ???;
            }
            else
            {
                    27342272 = new System.ArgumentNullException(paramName:  27546704);
                throw 27342272;
            }
        
        }
        public static byte[] CTToPNG(UnityEngine.Sprite sprite)
        {
            if(sprite != 0)
            {
                    if(mem[536886147] != 0)
            {
                    return Crosstales.ExtensionMethods.CTToPNG(texture:  sprite.texture);
            }
            
                return Crosstales.ExtensionMethods.CTToPNG(texture:  sprite.texture);
            }
            
            27342272 = new System.ArgumentNullException(paramName:  27544952);
            throw 27342272;
        }
        public static byte[] CTToJPG(UnityEngine.Sprite sprite)
        {
            if(sprite != 0)
            {
                    if(mem[536886147] != 0)
            {
                    return Crosstales.ExtensionMethods.CTToJPG(texture:  sprite.texture);
            }
            
                return Crosstales.ExtensionMethods.CTToJPG(texture:  sprite.texture);
            }
            
            27342272 = new System.ArgumentNullException(paramName:  27544952);
            throw 27342272;
        }
        public static byte[] CTToTGA(UnityEngine.Sprite sprite)
        {
            if(sprite != 0)
            {
                    if(mem[536886147] != 0)
            {
                    return Crosstales.ExtensionMethods.CTToTGA(texture:  sprite.texture);
            }
            
                return Crosstales.ExtensionMethods.CTToTGA(texture:  sprite.texture);
            }
            
            27342272 = new System.ArgumentNullException(paramName:  27544952);
            throw 27342272;
        }
        public static byte[] CTToEXR(UnityEngine.Sprite sprite)
        {
            if(sprite != 0)
            {
                    if(mem[536886147] != 0)
            {
                    return Crosstales.ExtensionMethods.CTToEXR(texture:  sprite.texture);
            }
            
                return Crosstales.ExtensionMethods.CTToEXR(texture:  sprite.texture);
            }
            
            27342272 = new System.ArgumentNullException(paramName:  27544952);
            throw 27342272;
        }
        public static byte[] CTToPNG(UnityEngine.Texture2D texture)
        {
            if(texture != 0)
            {
                    return UnityEngine.ImageConversion.EncodeToPNG(tex:  texture);
            }
            
            27342272 = new System.ArgumentNullException(paramName:  27546232);
            throw 27342272;
        }
        public static byte[] CTToJPG(UnityEngine.Texture2D texture)
        {
            if(texture != 0)
            {
                    return UnityEngine.ImageConversion.EncodeToJPG(tex:  texture);
            }
            
            27342272 = new System.ArgumentNullException(paramName:  27546232);
            throw 27342272;
        }
        public static byte[] CTToTGA(UnityEngine.Texture2D texture)
        {
            if(texture != 0)
            {
                    return UnityEngine.ImageConversion.EncodeToTGA(tex:  texture);
            }
            
            27342272 = new System.ArgumentNullException(paramName:  27546232);
            throw 27342272;
        }
        public static byte[] CTToEXR(UnityEngine.Texture2D texture)
        {
            if(texture != 0)
            {
                    return UnityEngine.ImageConversion.EncodeToEXR(tex:  texture);
            }
            
            27342272 = new System.ArgumentNullException(paramName:  27546232);
            throw 27342272;
        }
        public static UnityEngine.Sprite CTToSprite(UnityEngine.Texture2D texture, float pixelsPerUnit = 100)
        {
            if(texture != 0)
            {
                    UnityEngine.Rect val_4 = new UnityEngine.Rect(x:  0f, y:  0f, width:  (float)texture.width, height:  (float)texture.height);
                return (UnityEngine.Sprite)UnityEngine.Sprite.Create(texture:  texture, rect:  new UnityEngine.Rect() {m_XMin = val_4.m_XMin, m_YMin = val_4.m_YMin, m_Width = val_4.m_Width, m_Height = val_4.m_Height}, pivot:  new UnityEngine.Vector2(), pixelsPerUnit:  0.5f);
            }
            
            27342272 = new System.ArgumentNullException(paramName:  27546232);
            throw 27342272;
        }
        public static UnityEngine.Texture2D CTRotate90(UnityEngine.Texture2D texture)
        {
            var val_23;
            var val_24;
            if(texture == 0)
            {
                goto label_2;
            }
            
            int val_5 = texture.height * texture.width;
            val_23 = public System.Int32 UnityEngine.Texture::get_height();
            if(texture.height < 1)
            {
                goto label_4;
            }
            
            label_11:
            val_24 = public System.Int32 UnityEngine.Texture::get_width();
            if(texture.width < 1)
            {
                goto label_5;
            }
            
            var val_26 = 0;
            label_10:
            var val_23 = 0;
            val_23 = val_23 * texture.width;
            val_23 = val_23 + (texture.height * texture.width);
            val_23 = val_23 - texture.width;
            val_23 = val_26 + val_23;
            if(val_23 >= val_2.Length)
            {
                goto label_9;
            }
            
            var val_24 = 0;
            val_24 = val_24 + (texture.height * texture.width);
            val_24 = val_24 - (texture.height * val_26);
            val_24 = val_24 - texture.height;
            if(val_24 >= mem[536881071])
            {
                goto label_9;
            }
            
            val_24 = 536881047 + (val_24 << 2);
            val_26 = val_26 + 1;
            mem2[0] = texture.GetPixels32(miplevel:  0)[val_23 << 2];
            val_24 = public System.Int32 UnityEngine.Texture::get_width();
            if(val_26 < texture.width)
            {
                goto label_10;
            }
            
            label_5:
            val_23 = public System.Int32 UnityEngine.Texture::get_height();
            if(1 < texture.height)
            {
                goto label_11;
            }
            
            label_4:
            UnityEngine.Texture2D val_21 = 536894117;
            val_21 = new UnityEngine.Texture2D(width:  texture.height, height:  texture.width, textureFormat:  texture.format, mipChain:  false);
            val_21.SetPixels32(colors:  536881047, miplevel:  0);
            val_21.Apply();
            return val_21;
            label_9:
            label_2:
            27342272 = new System.ArgumentNullException(paramName:  27546232);
            throw 27342272;
        }
        public static UnityEngine.Texture2D CTRotate180(UnityEngine.Texture2D texture)
        {
            if(texture != 0)
            {
                    int val_5 = texture.height * texture.width;
                if(val_2.Length >= 1)
            {
                    var val_12 = 0;
                Unknown val_6 = val_2.Length & 4294967295;
                var val_13 = 0;
                do
            {
                if(val_12 >= val_6)
            {
                    throw new NullReferenceException();
            }
            
                val_6 = val_13 + val_6;
                if(val_6 >= mem[536881071])
            {
                    throw new NullReferenceException();
            }
            
                val_6 = 536881047 + (val_6 << 2);
                val_12 = val_12 + 1;
                val_13 = val_13 - 1;
                mem2[0] = null;
            }
            while(val_12 < (val_2.Length << ));
            
            }
            
                UnityEngine.Texture2D val_10 = 536894117;
                val_10 = new UnityEngine.Texture2D(width:  texture.width, height:  texture.height, textureFormat:  texture.format, mipChain:  false);
                val_10.SetPixels32(colors:  536881047, miplevel:  0);
                val_10.Apply();
                return val_10;
            }
            
            27342272 = new System.ArgumentNullException(paramName:  27546232);
            throw 27342272;
        }
        public static UnityEngine.Texture2D CTRotate270(UnityEngine.Texture2D texture)
        {
            var val_20;
            var val_21;
            if(texture == 0)
            {
                goto label_2;
            }
            
            int val_5 = texture.height * texture.width;
            val_20 = public System.Int32 UnityEngine.Texture::get_height();
            if(texture.height < 1)
            {
                goto label_4;
            }
            
            var val_23 = 0;
            var val_24 = 0;
            label_11:
            val_21 = public System.Int32 UnityEngine.Texture::get_width();
            if(texture.width < 1)
            {
                goto label_5;
            }
            
            var val_22 = 0;
            label_10:
            var val_12 = val_23 + val_22;
            if(val_12 >= val_2.Length)
            {
                goto label_9;
            }
            
            int val_13 = val_24 + (texture.height * texture.width);
            val_13 = val_13 - (texture.height * val_22);
            val_13 = val_13 - texture.height;
            if(val_13 >= mem[536881071])
            {
                goto label_9;
            }
            
            val_13 = 536881047 + (val_13 << 2);
            val_22 = val_22 + 1;
            mem2[0] = texture.GetPixels32(miplevel:  0)[val_12 << 2];
            val_21 = public System.Int32 UnityEngine.Texture::get_width();
            if(val_22 < texture.width)
            {
                goto label_10;
            }
            
            val_23 = val_23 + val_22;
            label_5:
            val_24 = val_24 + 1;
            val_20 = public System.Int32 UnityEngine.Texture::get_height();
            if(val_24 < texture.height)
            {
                goto label_11;
            }
            
            label_4:
            UnityEngine.Texture2D val_19 = 536894117;
            val_19 = new UnityEngine.Texture2D(width:  texture.height, height:  texture.width, textureFormat:  texture.format, mipChain:  false);
            val_19.SetPixels32(colors:  536881047, miplevel:  0);
            val_19.Apply();
            return val_19;
            label_9:
            label_2:
            27342272 = new System.ArgumentNullException(paramName:  27546232);
            throw 27342272;
        }
        public static UnityEngine.Texture2D CTToTexture2D(UnityEngine.Texture texture)
        {
            if(texture != 0)
            {
                    return UnityEngine.Texture2D.CreateExternalTexture(width:  texture, height:  texture, format:  3, mipChain:  false, linear:  false, nativeTex:  texture.GetNativeTexturePtr());
            }
            
            27342272 = new System.ArgumentNullException(paramName:  27546232);
            throw 27342272;
        }
        public static UnityEngine.Texture2D CTFlipHorizontal(UnityEngine.Texture2D texture)
        {
            int val_8 = texture.height;
            UnityEngine.Texture2D val_3 = 536894117;
            val_3 = new UnityEngine.Texture2D(width:  texture.width, height:  val_8 = texture.height);
            int val_4 = texture.width;
            if(val_4 >= 1)
            {
                    val_8 = texture.height;
                var val_9 = 0;
                do
            {
                if(val_8 >= 1)
            {
                    var val_8 = 0;
                do
            {
                UnityEngine.Color val_7 = texture.GetPixel(x:  0, y:  0);
                val_3.SetPixel(x:  val_4 + val_9, y:  0, color:  new UnityEngine.Color() {r = val_7.r, g = val_7.g, b = val_7.b, a = val_7.a});
                val_8 = val_8 + 1;
            }
            while(val_8 != val_8);
            
            }
            
                val_9 = val_9 + 1;
            }
            while(val_9 != val_4);
            
            }
            
            val_3.Apply();
            return val_3;
        }
        public static UnityEngine.Texture2D CTFlipVertical(UnityEngine.Texture2D texture)
        {
            int val_8 = texture.height;
            UnityEngine.Texture2D val_3 = 536894117;
            val_3 = new UnityEngine.Texture2D(width:  texture.width, height:  val_8 = texture.height);
            int val_4 = texture.width;
            int val_5 = texture.height;
            if(val_4 >= 1)
            {
                    val_8 = val_5;
                var val_10 = 0;
                do
            {
                if(val_8 >= 1)
            {
                    var val_9 = 0;
                int val_8 = val_5 - 1;
                do
            {
                UnityEngine.Color val_7 = texture.GetPixel(x:  0, y:  0);
                val_3.SetPixel(x:  0, y:  val_8, color:  new UnityEngine.Color() {r = val_7.r, g = val_7.g, b = val_7.b, a = val_7.a});
                val_8 = val_8 - 1;
                val_9 = val_9 + 1;
            }
            while(val_8 != 1);
            
            }
            
                val_10 = val_10 + 1;
            }
            while(val_10 != val_4);
            
            }
            
            val_3.Apply();
            return val_3;
        }
        public static bool CTHasActiveClip(UnityEngine.AudioSource source)
        {
            UnityEngine.Object val_11 = 27351912;
            if(source == 0)
            {
                    return false;
            }
            
            val_11 = source.clip;
            if(val_11 == 0)
            {
                    return false;
            }
            
            if(source.isPlaying == true)
            {
                    return false;
            }
            
            if(source.loop != false)
            {
                    return false;
            }
            
            int val_6 = source.timeSamples;
            if(val_6 >= 1)
            {
                    val_11 = val_6;
                var val_10 = (val_11 < (source.clip.samples - 256)) ? 1 : 0;
                return false;
            }
            
            return false;
        }
        public static bool CTIsVisibleFrom(UnityEngine.Renderer renderer, UnityEngine.Camera camera)
        {
            float val_5;
            float val_6;
            System.ArgumentNullException val_10;
            string val_11;
            if(renderer == 0)
            {
                goto label_2;
            }
            
            if(camera == 0)
            {
                goto label_4;
            }
            
            UnityEngine.Bounds val_4 = renderer.bounds;
            return (bool)UnityEngine.GeometryUtility.TestPlanesAABB(planes:  UnityEngine.GeometryUtility.CalculateFrustumPlanes(camera:  camera), bounds:  new UnityEngine.Bounds() {m_Center = new UnityEngine.Vector3() {x = val_5, y = val_5, z = val_5}, m_Extents = new UnityEngine.Vector3() {x = val_5, y = val_6, z = val_6}});
            label_2:
            val_10 = 27342272;
            val_11 = 27543120;
            goto label_6;
            label_4:
            val_10 = 27342272;
            val_11 = 27529472;
            label_6:
            val_10 = new System.ArgumentNullException(paramName:  val_11);
            throw val_10;
        }
        private static UnityEngine.Transform deepSearch(UnityEngine.Transform parent, string name)
        {
            string val_10;
            UnityEngine.Object val_11;
            UnityEngine.Object val_12;
            var val_13;
            var val_14;
            var val_15;
            UnityEngine.Object val_16;
            var val_17;
            var val_18;
            var val_19;
            val_10 = name;
            val_11 = parent;
            if(val_11 == null)
            {
                    throw new NullReferenceException();
            }
            
            val_12 = val_11.Find(n:  val_10);
            if(val_12 != 0)
            {
                    return (UnityEngine.Transform)(6 == 5) ? (val_16) : 0;
            }
            
            val_11 = val_11.GetEnumerator();
            label_20:
            val_13 = val_11;
            if((val_11 & 1) == 0)
            {
                goto label_9;
            }
            
            val_14 = val_11;
            if(val_11 != null)
            {
                    val_15 = 536894493;
            }
            
            val_16 = val_11;
            if(val_16 == 0)
            {
                goto label_20;
            }
            
            val_10 = 0;
            val_17 = 5;
            goto label_36;
            label_9:
            val_10 = 0;
            val_16 = 0;
            val_17 = 6;
            label_36:
            if(X0 == false)
            {
                goto label_22;
            }
            
            var val_10 = X0;
            val_11 = X0;
            var val_9 = X0 + 298;
            if(val_9 == 0)
            {
                goto label_23;
            }
            
            var val_8 = X0 + 176;
            val_8 = val_8 + 8;
            label_25:
            if(((X0 + 176 + 8) + -8) == 536887297)
            {
                goto label_24;
            }
            
            val_9 = val_9 - 1;
            val_8 = val_8 + 16;
            if(((X0 + 176 + 8) + -8) != 536887297)
            {
                goto label_25;
            }
            
            label_23:
            val_18 = val_11;
            goto label_26;
            label_24:
            val_10 = val_10 + (((X0 + 176 + 8)) << 4);
            val_18 = val_10 + 312;
            label_26:
            val_15 = mem[((X0 + ((X0 + 176 + 8)) << 4) + 312) + 8];
            val_15 = ((X0 + ((X0 + 176 + 8)) << 4) + 312) + 8;
            label_22:
            if(val_10 == 0)
            {
                    return (UnityEngine.Transform)(6 == 5) ? (val_16) : 0;
            }
            
            if(val_15 != 1)
            {
                goto label_35;
            }
            
            goto label_36;
            label_35:
            label_43:
            if(X0 == false)
            {
                goto label_37;
            }
            
            var val_13 = X0;
            var val_12 = X0 + 298;
            if(val_12 == 0)
            {
                goto label_38;
            }
            
            var val_11 = X0 + 176;
            val_11 = val_11 + 8;
            label_40:
            if(((X0 + 176 + 8) + -8) == 536887297)
            {
                goto label_39;
            }
            
            val_12 = val_12 - 1;
            val_11 = val_11 + 16;
            if(((X0 + 176 + 8) + -8) != 536887297)
            {
                goto label_40;
            }
            
            label_38:
            val_19 = X0;
            goto label_41;
            label_39:
            val_13 = val_13 + (((X0 + 176 + 8)) << 4);
            val_19 = val_13 + 312;
            label_41:
            label_37:
            if(0 != 0)
            {
                goto label_43;
            }
            
            goto label_43;
        }
        private static System.Collections.Generic.List<UnityEngine.Transform> getAllChildren(UnityEngine.Transform parent, int maxDepth = 0, System.Collections.Generic.List<UnityEngine.Transform> transformList, int depth = 0)
        {
            var val_10;
            var val_11;
            System.Collections.IEnumerator val_12;
            var val_13;
            var val_14;
            var val_15;
            var val_16;
            var val_17;
            val_10 = transformList;
            val_11 = maxDepth;
            val_12 = parent;
            if(val_10 == null)
            {
                    System.Collections.Generic.List<System.Object> val_1 = 536877615;
                if(val_1 == 0)
            {
                    throw new NullReferenceException();
            }
            
                val_10 = val_1;
                val_13 = -1073676309;
                val_1 = new System.Collections.Generic.List<System.Object>();
            }
            
            if(((val_11 != 0) ? (depth + 1) : depth) > val_11)
            {
                    return (System.Collections.Generic.List<UnityEngine.Transform>)val_10;
            }
            
            if(val_12 == null)
            {
                    throw new NullReferenceException();
            }
            
            val_12 = val_12.GetEnumerator();
            label_24:
            val_14 = val_12;
            if((val_12 & 1) == 0)
            {
                goto label_10;
            }
            
            val_15 = val_12;
            if(val_12 != null)
            {
                    val_13 = 536894493;
            }
            
            if(val_10 == 0)
            {
                    throw new NullReferenceException();
            }
            
            var val_8 = mem[536877643];
            val_8 = val_8 + 1;
            mem[536877643] = val_8;
            if(mem[536877631] == 0)
            {
                    throw new NullReferenceException();
            }
            
            if(mem[536877639] < (mem[536877631] + 24))
            {
                    var val_7 = mem[536877631] + ((mem[536877639]) << 3);
                mem[536877639] = mem[536877639] + 1;
                mem2[0] = val_12;
            }
            
            if(mem[536886147] != 0)
            {
                goto label_24;
            }
            
            goto label_24;
            label_10:
            val_11 = 0;
            label_39:
            if(X0 == false)
            {
                goto label_25;
            }
            
            var val_11 = X0;
            val_12 = X0;
            var val_10 = X0 + 298;
            if(val_10 == 0)
            {
                goto label_26;
            }
            
            var val_9 = X0 + 176;
            val_9 = val_9 + 8;
            label_28:
            if(((X0 + 176 + 8) + -8) == 536887297)
            {
                goto label_27;
            }
            
            val_10 = val_10 - 1;
            val_9 = val_9 + 16;
            if(((X0 + 176 + 8) + -8) != 536887297)
            {
                goto label_28;
            }
            
            label_26:
            val_16 = val_12;
            goto label_29;
            label_27:
            val_11 = val_11 + (((X0 + 176 + 8)) << 4);
            val_16 = val_11 + 312;
            label_29:
            val_13 = mem[((X0 + ((X0 + 176 + 8)) << 4) + 312) + 8];
            val_13 = ((X0 + ((X0 + 176 + 8)) << 4) + 312) + 8;
            label_25:
            if(val_11 == 0)
            {
                    return (System.Collections.Generic.List<UnityEngine.Transform>)val_10;
            }
            
            if(val_13 != 1)
            {
                goto label_38;
            }
            
            goto label_39;
            label_38:
            label_46:
            if(X0 == false)
            {
                goto label_40;
            }
            
            var val_14 = X0;
            var val_13 = X0 + 298;
            if(val_13 == 0)
            {
                goto label_41;
            }
            
            var val_12 = X0 + 176;
            val_12 = val_12 + 8;
            label_43:
            if(((X0 + 176 + 8) + -8) == 536887297)
            {
                goto label_42;
            }
            
            val_13 = val_13 - 1;
            val_12 = val_12 + 16;
            if(((X0 + 176 + 8) + -8) != 536887297)
            {
                goto label_43;
            }
            
            label_41:
            val_17 = X0;
            goto label_44;
            label_42:
            val_14 = val_14 + (((X0 + 176 + 8)) << 4);
            val_17 = val_14 + 312;
            label_44:
            label_40:
            if(0 != 0)
            {
                goto label_46;
            }
            
            goto label_46;
        }
        private static float bytesToFloat(byte firstByte, byte secondByte)
        {
            float val_1 = (float)(int)firstByte & 65535;
            val_1 = val_1 * (3.051758E-05f);
            return (float)val_1;
        }
        private static ExtensionMethods()
        {
            mem2[0] = 5.26354424712089E-315;
            mem2[0] = 1065353216;
        }
    
    }

}
